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
With 3 video elements we can switch to interstitials without having to unload MSE and recreate it for a new HLS.js instance when interstitials come by.
hls.media exposes the main video element. We can insert two other video elements after (there's this API: https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement) and use the HLS.js INTERSTITIAL_ASSET_PLAYER_CREATED event to grab the interstitials HLS.js instance, and attach our own media to it.
We'll use 1 media element for the "primary content" and toggle between the two others for interstitials purposes, eg:
interstitial 1 uses media element 2
interstitial 2 uses media element 3
interstitial 3 uses media element 2
interstitial 4 uses media element 3
primary uses media element 1
The text was updated successfully, but these errors were encountered:
It should be behind a feature flag.
With 3 video elements we can switch to interstitials without having to unload MSE and recreate it for a new HLS.js instance when interstitials come by.
hls.media
exposes the main video element. We can insert two other video elements after (there's this API: https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement) and use the HLS.jsINTERSTITIAL_ASSET_PLAYER_CREATED
event to grab the interstitials HLS.js instance, and attach our own media to it.We'll use 1 media element for the "primary content" and toggle between the two others for interstitials purposes, eg:
The text was updated successfully, but these errors were encountered: