update components
This commit is contained in:
+10
-7
@@ -54,13 +54,14 @@ class MSEMediaController extends EventHandler {
|
||||
}
|
||||
|
||||
startLoad() {
|
||||
if (this.levels && this.media) {
|
||||
if (this.levels) {
|
||||
this.startInternal();
|
||||
if (this.lastCurrentTime) {
|
||||
logger.log(`seeking @ ${this.lastCurrentTime}`);
|
||||
var media = this.media, lastCurrentTime = this.lastCurrentTime;
|
||||
if (media && lastCurrentTime) {
|
||||
logger.log(`seeking @ ${lastCurrentTime}`);
|
||||
if (!this.lastPaused) {
|
||||
logger.log('resuming video');
|
||||
this.media.play();
|
||||
media.play();
|
||||
}
|
||||
this.state = State.IDLE;
|
||||
} else {
|
||||
@@ -70,7 +71,7 @@ class MSEMediaController extends EventHandler {
|
||||
this.nextLoadPosition = this.startPosition = this.lastCurrentTime;
|
||||
this.tick();
|
||||
} else {
|
||||
logger.warn('cannot start loading as either manifest not parsed or video not attached');
|
||||
logger.warn('cannot start loading as manifest not parsed yet');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -666,7 +667,7 @@ class MSEMediaController extends EventHandler {
|
||||
to avoid rounding issues/infinite loop,
|
||||
only flush buffer range of length greater than 500ms.
|
||||
*/
|
||||
if (flushEnd - flushStart > 0.5) {
|
||||
if (Math.min(flushEnd,bufEnd) - flushStart > 0.5) {
|
||||
logger.log(`flush ${type} [${flushStart},${flushEnd}], of [${bufStart},${bufEnd}], pos:${this.media.currentTime}`);
|
||||
sb.remove(flushStart, flushEnd);
|
||||
return false;
|
||||
@@ -679,6 +680,8 @@ class MSEMediaController extends EventHandler {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger.warn('abort flushing too many retries');
|
||||
}
|
||||
|
||||
/* after successful buffer flushing, rebuild buffer Range array
|
||||
@@ -1221,7 +1224,7 @@ _checkBuffer() {
|
||||
jumpThreshold = 0;
|
||||
} else {
|
||||
// playhead not moving AND media playing
|
||||
logger.log('playback seems stuck');
|
||||
logger.log(`playback seems stuck @${currentTime}`);
|
||||
if(!this.stalled) {
|
||||
this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_STALLED_ERROR, fatal: false});
|
||||
this.stalled = true;
|
||||
|
||||
Reference in New Issue
Block a user