Skip to content

Commit

Permalink
Trigger BUFFER_NUDGE_ON_STALL before currentTime update (video-dev#1795)
Browse files Browse the repository at this point in the history
  • Loading branch information
romsil authored and johnBartos committed Jun 23, 2018
1 parent 4fccc86 commit 8283b34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controller/stream-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1532,12 +1532,12 @@ class StreamController extends TaskLoop {
const targetTime = currentTime + nudgeRetry * config.nudgeOffset;
logger.log(`adjust currentTime from ${currentTime} to ${targetTime}`);
// playback stalled in buffered area ... let's nudge currentTime to try to overcome this
media.currentTime = targetTime;
hls.trigger(Event.ERROR, {
type: ErrorTypes.MEDIA_ERROR,
details: ErrorDetails.BUFFER_NUDGE_ON_STALL,
fatal: false
});
media.currentTime = targetTime;
} else {
logger.error(`still stuck in high buffer @${currentTime} after ${config.nudgeMaxRetry}, raise fatal error`);
hls.trigger(Event.ERROR, {
Expand Down

0 comments on commit 8283b34

Please sign in to comment.