Skip to content

Commit

Permalink
fix: Allow set maxLatency and minLatency to 0 (#7704)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad committed Dec 4, 2024
1 parent cc11605 commit 64b861c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -6984,7 +6984,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
's). Updating playbackRate to ' + minPlaybackRate);
this.trickPlay(minPlaybackRate, /* useTrickPlayTrack= */ false);
}
} else if (maxLatency && maxPlaybackRate &&
} else if (maxLatency != undefined && maxPlaybackRate &&
(latency - offset) > maxLatency) {
if (playbackRate != maxPlaybackRate) {
shaka.log.debug('Latency (' + latency + 's) is greater than ' +
Expand All @@ -6993,7 +6993,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
this.trickPlay(maxPlaybackRate, /* useTrickPlayTrack= */ false);
}
this.targetLatencyReached_ = null;
} else if (minLatency && minPlaybackRate &&
} else if (minLatency != undefined && minPlaybackRate &&
(latency - offset) < minLatency) {
if (playbackRate != minPlaybackRate) {
shaka.log.debug('Latency (' + latency + 's) is smaller than ' +
Expand Down

0 comments on commit 64b861c

Please sign in to comment.