Skip to content

Commit

Permalink
Bypass the minPlaybackRateChange check when newRate=1.0 (#4481)
Browse files Browse the repository at this point in the history
- This avoids the situation where the playbackrate can get stuck at non
  1.0 rate, due to the rate change being less than minPlaybackRateChange
  • Loading branch information
piersoh committed May 17, 2024
1 parent 18156a1 commit 912c14c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/controllers/CatchupController.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function CatchupController() {
const minPlaybackRateChange = isSafari ? 0.25 : 0.02 / (0.5 / liveCatchupPlaybackRates.max);

// Obtain newRate and apply to video model. Don't change playbackrate for small variations (don't overload element with playbackrate changes)
if (newRate && Math.abs(currentPlaybackRate - newRate) >= minPlaybackRateChange) { // non-null
if (newRate && Math.abs(currentPlaybackRate - newRate) >= minPlaybackRateChange || newRate == 1.0) { // non-null
logger.debug(`[CatchupController]: Setting playback rate to ${newRate}`);
videoModel.setPlaybackRate(newRate);
}
Expand Down

0 comments on commit 912c14c

Please sign in to comment.