Appending a <source>
element?
#6630
Replies: 1 comment
-
HLS.js always adds a MediaSource or ManagedMediaSource to the media element passed to The only reason to add two such sources is for AirPlay with MSE. In that case, the m3u8 source comes after the MediaSource blob added by hls.js in Safari. This allows AirPlay devices to receive the m3u8 url for playback since the MediaSource (blob) is a reference to something only available on the sender. |
Beta Was this translation helpful? Give feedback.
-
I think I wish I could use this library to get a DOM that looks like this:
iOS and Android browsers tend to support native HLS playback. In the real world (high latency, slow phone, etc.) they also tend to download and execute JavaScript more slowly than their desktop counterparts.
As far as I can tell, the above DOM would allow those mobile devices to start playing HLS video before JavaScript executes, without affecting desktop devices that depend on HLS.js. I think the HLS.js fallback might be more reliable, too, since it wouldn't use
canPlayType()
.Is there something about this approach that wouldn't work well? I'm still very new to HLS and
MediaSource
, so I wanted to ask first before I go writing up some big suggestion for a new feature that wouldn't be viable.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions