Player enters endless seeking state when setting currentTime() to duration()
Description
If I set the currentTime() of a player to the duration() to go to the end of a HLS video, the player shows the seeking spinner endlessly.
Reduced test case
https://codepen.io/phelaz/pen/ZENzWNo
Steps to reproduce
- Open the test case CodePen (e.g. Firefox because Edge/Chromium browsers sometimes show
MEDIA_ERR_DECODEerrors) - Wait for the
loadeddataevent to enable the "Go to end" button - Press the "Go to end" button (this sets the
currentTime()to theduration()return value) - The player shows the loading spinner but is unable to show a frame
Errors
No response
What version of Video.js are you using?
8.12.0
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
Edge 124.0.2478.80, Firefox 125.0.3
What OS(es) and version(s) does this occur with?
Windows 11
👋 Thanks for opening your first issue here! 👋
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
This reproduces from Video.js 8.11.8 with VHS 3.12.0. 8.11.4/3.11.2 and below are OK. Possibly an effect of #1489.
On 8.11.4 and below logging player.duration() on durationchange events, you see the duration drops to 733.999999 from 734 on the seek