Skip to content

Commit

Permalink
fix(media): SourceBuffer remove error on some platforms (#3042)
Browse files Browse the repository at this point in the history
Fixes #2982

Backported to v2.5.x

Change-Id: Iaef7b13c3798f4da63e576387e5728aa95d92d3f
  • Loading branch information
Álvaro Velad Galván authored and joeyparrish committed Dec 16, 2020
1 parent 1c11836 commit 9677f2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/media/streaming_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2095,13 +2095,14 @@ shaka.media.StreamingEngine.prototype.evict_ = function(
let bufferedBehind = presentationTime - startTime;

let overflow = bufferedBehind - bufferBehind;
if (overflow <= 0) {
// See: https://github.com/google/shaka-player/issues/2982
if (overflow <= 0.01) {
shaka.log.v2(logPrefix,
'buffer behind okay:',
'presentationTime=' + presentationTime,
'bufferedBehind=' + bufferedBehind,
'bufferBehind=' + bufferBehind,
'underflow=' + (-overflow));
'underflow=' + Math.abs(overflow));
return Promise.resolve();
}

Expand Down

0 comments on commit 9677f2a

Please sign in to comment.