Bug: hls.js regenerating after load
Is there an existing issue for this?
- [x] I have searched the existing issues
Which Mux Elements/Packages does this apply to? Select all that apply
playback-core
Which browsers are you using?
Chrome, Firefox
Which operating systems are you using?
Other (add details below)
Description
I'm using this component via mux-video v0.22.0, After completing the full load, HLS.js seems to begin a new transmux session, I can't figure out what might be triggering it. Is there anything I can do to mitigate this issue? Why might it be doing this?
Reduced test case
https://codepen.io/endymion1818/pen/eYqXaYw
Steps to reproduce
- Load player
- Wait 5 / 10 seconds
- Observe new transmux session
Current Behavior
A new transmux session is initiated after load
Expected Behavior
Initial transmux session is not discarded and the player doesn't re-render
Errors
[log] > [transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 3 id: 1
discontinuity: true
trackSwitch: true
contiguous: false
accurateTimeOffset: true
timeOffset: 0
initSegmentChange: true
[log] > [mp4-remuxer]: ISGenerated flag reset
What version of the package are you using?
0.27.0
It seems to be happening on the native player, so this is an even better reproducible example: https://codepen.io/endymion1818/pen/JoPKXRg
thanks for the feedback @endymion1818. this does look like a hls.js issue though. is this causing any unexpected behavior or playback issues?
It leads to rerenders which creates cumulative layout shift, so if the player is in the viewport it could result in site performance issues. My PO has noticed it and asked me to investigate it, I think they're worried the experience is a little jarring.
It does look like a hls issue but I can't figure out what triggers it.
We use JWPlayer currently and that doesn't seem to display the defect but it's currently using a very old version of hls.js, and they could have done other things to mask the behaviour.
Sorry, deleted the example which uses <mux-video> and no other dependencies, here's a new example: https://codepen.io/endymion1818/pen/RNbQaob?editors=1111