hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

BaseStreamController always honor config.startPosition when attaching(recovering)

Open kedanielwu opened this issue 2 years ago • 2 comments

What do you want to do with Hls.js?

In BaseStreamController, onMediaAttached callback always use config.startPosition to call startLoad(), regardless the playback status. Is this behaviour desired? I found it bit weried.

lets say I set startPosition to 90, and played for a while, then call the recoverMediaError() call will seek back to 90, shouldn't BaseStreamController.lastCurrentTime be used in this case?

What have you tried so far?

No response

kedanielwu avatar Mar 21 '24 03:03 kedanielwu

Using config.startPosition on attached is a "feature". While you need to clear or change the value before re-attaching the player, I can agree that this should not be the behavior when using recoverMediaError().

robwalch avatar Mar 21 '24 17:03 robwalch

#6591 fixes this behavior for recoverMediaError().

You can try the branch build at https://feature-interstitials.hls-js-4zn.pages.dev/demo/

robwalch avatar Jul 30 '24 18:07 robwalch