THEOplayer / samples-html5-sdk

📚 Universal Video Player code samples for web
https://codesandbox.io/s/github/THEOplayer/samples-web
26 stars 12 forks source link

Fallback/Alternate Stream #26

Closed davidjk1 closed 4 years ago

davidjk1 commented 4 years ago

Hello, I'm using THEOplayer with live HLS streams and wondering if it's possible to have the player fall back to an alternate stream if the primary one isn't live at the moment. However ideally the player would routinely check the status of that main stream and, once it goes live, refresh the player to play that primary stream. Does that sound like something that's feasible making use of the player API?

thijsl commented 4 years ago

Hi @davidjk1 -- I'll try to assist.

Have you looked into redundant streams, as per the HLS spec at https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html? Would that serve your use-case?

I'd probably recommend addressing this by adhering to the spec (on the server-side) if you can, to avoid doing crazy things on the client-side, and also to make it compatible with as many platforms as possible. (Because let's say that you're not only targeting browsers, you'd also have to address this on the client-side on Android apps, iOS apps, etc.)

Kind regards, Thijs