buffer remove check so it doesnt apply when < 60 s audio are buffered
This commit is contained in:
parent
4478cf5958
commit
b5775a7477
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ class VideoLoader {
|
||||||
// remove old segments every 1 min
|
// remove old segments every 1 min
|
||||||
let timeout = 60000;
|
let timeout = 60000;
|
||||||
// if removal cannot happen since buffer is busy, try again in a bit
|
// if removal cannot happen since buffer is busy, try again in a bit
|
||||||
if (!this.media_buffer.updating) {
|
if (!this.media_buffer.updating && this.media_buffer.buffered.end(0) - 60 > this.media_buffer.buffered.start(0)) {
|
||||||
// remove segments that are older than 1min behind the current end of buffer
|
// remove segments that are older than 1min behind the current end of buffer
|
||||||
this.media_buffer.remove(0, this.media_buffer.buffered.end(0) - 60);
|
this.media_buffer.remove(0, this.media_buffer.buffered.end(0) - 60);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue