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
  • Loading branch information
Álvaro Velad Galván committed Dec 14, 2020
1 parent ed953bf commit b7209f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/media/streaming_engine.js
Expand Up @@ -1627,13 +1627,14 @@ shaka.media.StreamingEngine = class {
const bufferedBehind = presentationTime - startTime;

const 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;
}

Expand Down

0 comments on commit b7209f0

Please sign in to comment.