elements icon indicating copy to clipboard operation
elements copied to clipboard

Bug: hls.js regenerating after load

Open endymion1818 opened this issue 1 year ago • 4 comments

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

  1. Load player
  2. Wait 5 / 10 seconds
  3. 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

endymion1818 avatar Dec 09 '24 14:12 endymion1818

It seems to be happening on the native player, so this is an even better reproducible example: https://codepen.io/endymion1818/pen/JoPKXRg

endymion1818 avatar Dec 09 '24 17:12 endymion1818

thanks for the feedback @endymion1818. this does look like a hls.js issue though. is this causing any unexpected behavior or playback issues?

luwes avatar Dec 09 '24 18:12 luwes

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.

endymion1818 avatar Dec 09 '24 20:12 endymion1818

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

endymion1818 avatar Jan 08 '25 14:01 endymion1818