Skip to content

Update README Alternative setup for 2026 browsers - #7844

Merged
robwalch merged 1 commit into
masterfrom
docs/readme-alternative-setup
May 15, 2026
Merged

Update README Alternative setup for 2026 browsers#7844
robwalch merged 1 commit into
masterfrom
docs/readme-alternative-setup

Conversation

@robwalch

@robwalch robwalch commented May 8, 2026

Copy link
Copy Markdown
Collaborator

This PR will...

Update README "Alternative setup" to guard against unreliable native HLS.

Why is this Pull Request needed?

Browsers like Chrome 147 return "maybe" for canPlayType('application/vnd.apple.mpegurl')
but fail to play some HLS streams natively. Add ManagedMediaSource check to limit native
playback to recent Safari releases.

Resolves issues:

Closes #7827

@robwalch

robwalch commented May 8, 2026

Copy link
Copy Markdown
Collaborator Author
Comment thread README.md
if (video.canPlayType('application/vnd.apple.mpegurl')) {
if (
video.canPlayType('application/vnd.apple.mpegurl') &&
'ManagedMediaSource' in window

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest against adding this condition, since IIUC the recent Chrome regression is a temporary failure

older versions worked fine with native HLS streams, also with gzip-encoded .m3u8 playlists

so this would lead to future (fixed) versions of Chrome incorrectly using HLS.js instead of using the native HLS support

@tmathmeyer what do you think?

@robwalch robwalch May 8, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd agree if that were the case, but just going through the hls.js demo samples, with Chrome native HLS, reveals some pretty serious issues with audio-only, alternate audio, subtitles, captions, and live/low-latency support.

It's wonderful that it works fine for your content. I think the alternative setup warning and suggestion being added is still appropriate for general use. You are free to customize it to your liking.

@karlhorky karlhorky May 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I can see that point - I wasn't aware that Chrome native HLS compatibility still had so many problems

I wonder if it will be a goal of Chrome and other browsers to also eventually return true for 'ManagedMediaSource' in window as part of native HLS support. If that's the case, then this PR does indeed seem directionally correct


I'm assuming that you mean the demo streams at https://hlsjs.video-dev.org/demo/ ?

Would be great to get a page of all of those using the current alternative loading technique before this PR (or maybe even without HLS.js entirely), to show all of the broken behavior in Chrome and other browsers

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it will be a goal of Chrome and other browsers to also eventually return true for 'ManagedMediaSource' in window as part of native HLS support.

Support of ManagedMediaSource and native HLS are mutually exclusive. Adding the former doesn't fix the latter. As of this writing, it gets the job done. If that changes, you might have to update your support checks, and I the README.

I'm assuming that you mean the demo…

Correct.

Would be great to get a page of all of those

Great suggestion. I’m not sure we’d accept such a contribution, as support for HLS outside of hls.js is out of scope for this project.

@karlhorky karlhorky May 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion. I’m not sure we’d accept such a contribution, as support for HLS outside of hls.js is out of scope for this project.

@robwalch ok I created a project / webpage called HLS Compatibility Tests which syncs the streams from the HLS.js demo page, with a simple <video> player:

As your comment above mentions, I can see a few more streams that Chrome is unable to play completely.

For example, the Elephants Dream stream with alternate audio tracks doesn't play audio. And the Widevine stream does not play at all.

cc @tmathmeyer in case you're interested in a tester website showing more incompatible HLS streams in Chrome

@robwalch

Copy link
Copy Markdown
Collaborator Author

cc @dylanjha for insight on browser HLS support detection

@robwalch
robwalch merged commit c370440 into master May 15, 2026
49 of 52 checks passed
@robwalch
robwalch deleted the docs/readme-alternative-setup branch May 15, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants