Skip to content

Commit

Permalink
Improve native HLS buffering fudge factor
Browse files Browse the repository at this point in the history
Based on experimental evidence, this fudge factor has been increased
from 50ms to 100ms.  This is based on playback of the Art of Motion
HLS clip from Bitcodin, where the 50ms fudge was insufficient.

Without this, it goes into a buffering state at the end of the
content.

Issue #997

Change-Id: I7479705fd9e9359e70ab6ed3f24fd29dfdd7631e
  • Loading branch information
joeyparrish committed Apr 26, 2019
1 parent 4635a5a commit 8828728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -4970,7 +4970,7 @@ shaka.Player.prototype.isBufferedToEndSrc_ = function() {
// buffering state at the end of the stream.
// TODO: Try to remove the fudge here once we no longer manage buffering state
// above the browser with playbackRate=0.
const fudge = 0.05; // 50 ms
const fudge = 0.1; // 100 ms
return bufferEnd >= this.video_.duration - fudge;
};

Expand Down

0 comments on commit 8828728

Please sign in to comment.