Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hls.js on iOS > 17.1 (Simulator) #6161

Open
lucabergamini opened this issue Jan 30, 2024 · 7 comments
Open

Hls.js on iOS > 17.1 (Simulator) #6161

lucabergamini opened this issue Jan 30, 2024 · 7 comments
Labels
Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Documentation Question

Comments

@lucabergamini
Copy link

What do you want to do with Hls.js?

This might be a quite naive question, but
now that ManagedMediaSource is available on iOS >= 17.1 and hls.js supports it, should safari be able to use hls.js for videos?

My understanding was that the absence of MSE was the main blocker for hls.js, but I'm testing with a 17.2 simulator in xcode and I'm still receiving false from Hls.isSupported

What have you tried so far?

I'm running with the latest hls.js on iOS 17.2 safari:

  • Hls.getMediaSource returns native code;
  • Hls.isMSESupported returns true;
  • Hls.isSupported returns false

by reading the latter function comments, this might be because isTypeSupported returns false

@lucabergamini lucabergamini added Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. Question labels Jan 30, 2024
@robwalch
Copy link
Collaborator

robwalch commented Jan 30, 2024

Hi @lucabergamini,

Have you tried a real device?

The demo page with v1.5.3 is passing support checks and playing video with an iPhone 15 Pro (and other physical iPhone devices) on latest iOS.

This issue sounds specific to Simulator. Let me know if you find any configurations that do pass the ManagedMediaSource.isTypeSupported check on the simulator.

@robwalch robwalch added Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jan 30, 2024
@lucabergamini
Copy link
Author

I've not tried but I can do that tomorrow and report back. I will try the demo page too just to rule out any issue in our application.

I would not be surprised if Apple had missed something in the simulator honestly.

Part of the confusion was because the readme page of hls.js still reads

Please note: iOS Safari on iPhone does not support the MediaSource API. This includes all browsers on iOS as well as apps using UIWebView and WKWebView.

Safari browsers (iOS, iPadOS, and macOS) have built-in HLS support through the plain video "tag" source URL. See the example below (Using HLS.js) to run appropriate feature detection and choose between using HLS.js or natively built-in HLS support.

which is still true, but maybe could be amended to mention that now hls.js can use ManagedMediaSource

@robwalch
Copy link
Collaborator

I will try the demo page too just to rule out any issue in our application.

I tried, and got the "not supported" error. I don't consider this an issue with HLS.js, but an issue with the Simulator that you must report to Apple.

but maybe could be amended to mention that now hls.js can use ManagedMediaSource

Please consider contributing this change if you think it would help you and other users. I'd gladly accept a PR that updates the docs.

@lucabergamini
Copy link
Author

I tried, and got the "not supported" error. I don't consider this an issue with HLS.js, but an issue with the Simulator that you must report to Apple.

Oh sorry I didn't realised you tried that already. Cool, I'll just check with a real device tomorrow then.

Please consider contributing this change if you think it would help you and other users. I'd gladly accept a PR that updates the docs.

Will do!

@lucabergamini
Copy link
Author

@robwalch I just tested the demo page on an iOS device with 17.2.1 and it works there, so I expect our app to work too. I'll report the bug to apple

@robwalch robwalch changed the title Hls.js on iOS > 17.1 Hls.js on iOS > 17.1 (Simulator) Jan 30, 2024
@niklaskorz
Copy link

@lucabergamini Did you end up reporting the simulator issue to Apple, and did you get any response already?

@lucabergamini
Copy link
Author

Hi @niklaskorz I did report that. I got a response where they asked me to upload some data, which I did. After that they stopped replying to my following requests for updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser issue If there is an underlying issue with the browser that hls.js is running on, this tag should be used. Documentation Question
Projects
None yet
Development

No branches or pull requests

3 participants