README: Swap logic for checking Hls.isSupported()#2954
README: Swap logic for checking Hls.isSupported()#2954robwalch merged 2 commits intovideo-dev:masterfrom
Conversation
Before Safari supported MSE then this recommendation worked well because `Hls.isSupported()` would return `false`. Now that changed and it returns `true`. I typically think it's a best practice to use the browser's native HLS support if it's available, otherwise fallback to hls.js.
I agree (and do the same in JW Player), but not everyone thinks that way. Some folks want to use hls.js's API whenever possible to have access to:
There may be other reasons. On the down side, handling HLS streams with JavaScript is probably less power and memory efficient. There may also be places where the player is less stable than Safari (or vice versa). The latest release, v0.14.7, includes a lot of improvements for Safari playback on Desktop and iPad where MSE is available, and I would still like to encourage users to try it out and give us their feedback. |
Keep the same "Getting Started" example, but add a second "Alternative Setup"
|
Thanks for considering @robwalch, totally makes sense. The only reason I opened this is because I've seen many folks mix this up (myself included 😁 ). I updated the README to:
Feel free to take it or leave it, I can also understand if you don't want to clutter up the "Getting started" and risk making it too confusing for folks that are seeing it for the first time. Whatever you think is best! |
|
Hi @dylanjha, This is great! Thank you for improving the README and linking the comment above. |
If the browser has native HLS support, use it, more info here video-dev/hls.js#2954
This PR will...
Update README for checking browser HLS support.
Why is this Pull Request needed?
Before Safari supported MSE then this recommendation in the README worked well because
Hls.isSupported()would returnfalse. Now that changed and it returnstrue.I typically think it's a best practice to use the browser's native HLS support if it's available, otherwise fallback to
hls.jsChecklist
n/a - only a README update