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 8633980 commit 92f2db9
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 @@ -6849,7 +6849,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 @@ -6858,7 +6858,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 92f2db9

Please sign in to comment.