Skip to content

Commit

Permalink
Remove r parameter from live delay computation as we use it to jump t…
Browse files Browse the repository at this point in the history
…o a specific starting point. (#3271)
  • Loading branch information
dsilhavy committed May 31, 2020
1 parent 294406b commit 926e754
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/streaming/controllers/PlaybackController.js
Expand Up @@ -228,18 +228,11 @@ function PlaybackController() {
function computeLiveDelay(fragmentDuration, dvrWindowSize, minBufferTime = NaN) {
let delay,
ret,
r,
startTime;
const END_OF_PLAYLIST_PADDING = 10;
const MIN_BUFFER_TIME_FACTOR = 4;
const FRAGMENT_DURATION_FACTOR = 4;

let uriParameters = uriFragmentModel.getURIFragmentData();

if (uriParameters) {
r = parseInt(uriParameters.r, 10);
}

let suggestedPresentationDelay = adapter.getSuggestedPresentationDelay();

if (settings.get().streaming.lowLatencyEnabled) {
Expand All @@ -248,8 +241,6 @@ function PlaybackController() {
delay = mediaPlayerModel.getLiveDelay(); // If set by user, this value takes precedence
} else if (settings.get().streaming.liveDelayFragmentCount !== null && !isNaN(settings.get().streaming.liveDelayFragmentCount) && !isNaN(fragmentDuration)) {
delay = fragmentDuration * settings.get().streaming.liveDelayFragmentCount;
} else if (r) {
delay = r;
} else if (settings.get().streaming.useSuggestedPresentationDelay === true && suggestedPresentationDelay !== null && !isNaN(suggestedPresentationDelay) && suggestedPresentationDelay > 0) {
delay = suggestedPresentationDelay;
} else if (!isNaN(fragmentDuration)) {
Expand Down

0 comments on commit 926e754

Please sign in to comment.