-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
What do you want to do with Hls.js?
When I drag the playhead in my video.js interface, there are a number of seek events in quick succession, this results in Hls.js producing a loadof errors and the player will revert to the lowest level of quality. If I set the level to -1 (auto) it still remains at the lowest level thereon and appears stuck.
Fragments that started loading and later cancelled don't appear to be handled properly somewhere along the line, I'm not sure if this is an issue with video.js or Hls.js.
If I drag the playhead continuously (4-5 seconds), I will eventually get a fragParsingError which is fatal: true
, and then it will stop playing entirely and no more fragments will be requested.
I'm labelling this as a question because it does not appear to be a bug, more likely I've misconfigured something.
What have you tried so far?
this.hls = new Hls({
enableWorker: true,
lowLatencyMode: true,
manifestLoadPolicy: {
default: {
maxTimeToFirstByteMs: Infinity,
maxLoadTimeMs: 20000,
timeoutRetry: {
maxNumRetry: 5,
retryDelayMs: 0,
maxRetryDelayMs: 0,
},
errorRetry: {
maxNumRetry: 5,
retryDelayMs: 1000,
maxRetryDelayMs: 8000,
shouldRetry: (retryConfig, retryCount, isTimeout, httpStatus,retry)=>{
if (httpStatus.code == 404) return true;
return retry;
}
},
},
},
maxBufferLength: 10, // minimum guaranteed buffer length
maxMaxBufferLength: 20, // max seconds to buffer
liveDurationInfinity: true,
liveSyncDurationCount: 2, // # of segments to buffer before playing
});
this.hls.loadSource(this.src);
this.hls.attachMedia(this.video_el);
this.player = videojs(video_el, {
autoplay: autoplay && !isIOS,
playsinline: isIOS,
muted: autoplay && isIOS,
playbackRates: [0.5, 1, 1.25, 1.5, 2],
controls: true,
responsive: true,
liveui: true,
enableSmoothSeeking: true,
inactivityTimeout: 1000,
liveTracker: {
trackingThreshold: 0,
liveTolerance: 10
},
});