You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Text tracks with src= on Safari & UITextDisplayer are sometimes rendered natively (#8256)
This concerns `src=` mode. Safari loads text tracks separately, where on
`loadeddata`, we might not have `video.textTracks` set to its final
value (as Safari could still be processing another text track
underneath).
This PR introduces an artificial wait on the `addtrack` and assumes, if
no other track is added within the next 500ms, textTracks shall be in
its final state.
Issues when we work with `textTracks` too early:
- When we set mode of a textTrack to `hidden` (we'd do that to allow
UiTextDisplayer to render text tracks), Safari might overwrite this
decision (based on `AUTOSELECT=YES`) when a subsequent text track is
parsed. This leaves us in an invalid state where textTracks are rendered
natively but we have listeners bound to the wrong one. More info here:
#8255
- It could be no textTracks are available at all on `loadeddata` due to
Safari internally defering the load for text tracks. This would break
preferences.
---------
Co-authored-by: Álvaro Velad Galván <[email protected]>
0 commit comments