1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-03-27 19:22:53 -04:00
parent 8c738547c6
commit 52f247c51a
29 changed files with 185 additions and 402 deletions

View file

@ -1007,12 +1007,16 @@ _checkBuffer() {
if(playheadMoving || !expectedPlaying) {
// playhead moving or media not playing
jumpThreshold = 0;
this.seekHoleNudgeDuration = 0;
} else {
// playhead not moving AND media expected to play
if(!this.stalled) {
this.seekHoleNudgeDuration = 0;
logger.log(`playback seems stuck @${currentTime}`);
this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_STALLED_ERROR, fatal: false});
this.stalled = true;
} else {
this.seekHoleNudgeDuration += this.config.seekHoleNudgeDuration;
}
}
// if we are below threshold, try to jump if next buffer range is close
@ -1025,8 +1029,8 @@ _checkBuffer() {
!media.seeking) {
// next buffer is close ! adjust currentTime to nextBufferStart
// this will ensure effective video decoding
logger.log(`adjust currentTime from ${media.currentTime} to next buffered @ ${nextBufferStart}`);
media.currentTime = nextBufferStart;
logger.log(`adjust currentTime from ${media.currentTime} to next buffered @ ${nextBufferStart} + nudge ${this.seekHoleNudgeDuration}`);
media.currentTime = nextBufferStart + this.seekHoleNudgeDuration;
this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_SEEK_OVER_HOLE, fatal: false});
}
}