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

Try playing HLS on desktop Safari through MediaSource, not src= #2116

Closed
ismena opened this issue Aug 22, 2019 · 9 comments
Closed

Try playing HLS on desktop Safari through MediaSource, not src= #2116

ismena opened this issue Aug 22, 2019 · 9 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@ismena
Copy link
Contributor

ismena commented Aug 22, 2019

When hls manifests are routed through src=, it takes away the app's ability to select variant tracks and users' ability to select resolutions through the UI (Safari's native hls does not allow it).
We should see if we can route it through MediaSource on desktop Safari to keep this functionality.

I remember running into bugs in Safari's MediaSource implementation before we had the src= feature, but maybe things have changed since then.

@avelad
Copy link
Member

avelad commented Aug 22, 2019

Note: for FairPlay is necessary use src=

@ismena
Copy link
Contributor Author

ismena commented Aug 22, 2019

Ahhh, that's probably why! @joeyparrish and I were trying to figure out why we use src= on desktop yesterday, but couldn't remember.

@avelad
Copy link
Member

avelad commented Aug 22, 2019

Would it be possible to add a configuration for this?

@ismena ismena added type: enhancement New feature or request and removed needs triage labels Aug 22, 2019
@ismena
Copy link
Contributor Author

ismena commented Aug 22, 2019

Yeah, I'll discuss with Joey once he's back in office.
Essentially, if you're using FairPlay, you'll want Safari's native hls, right? And MediaSource otherwise?

Is there another use case I'm not thinking of?

@avelad
Copy link
Member

avelad commented Aug 22, 2019

Airplay only works with src= so I prefer a configuration where the application can decide what to use.

For FairPlay I always want to use src=.

@shaka-bot shaka-bot added this to the Backlog milestone Aug 22, 2019
@matvp91
Copy link
Contributor

matvp91 commented Aug 22, 2019

@ismena, exactly. com.apple.fps.1_0 is established by Safari emitting the webkitneedkey event on the video element. Using MediaSource is possible with com.apple.fps.2_0 but Apple does not provide any publicly available documentation. If I'm not mistaken, Netflix serves FairPlay DASH with MediaSource, but that's an exception.

Last checked, calling createSession with MediaSource made Safari crash...

@chrisfillmore
Copy link
Contributor

This is an old PR now:
#1199

I was able to generate a license challenge with MSE-EME, but had an issue getting a response from my license server. I wasn't sure if it was an issue with our proxy or with the Fairplay server. Eventually I ran out of time and had to work on other things. Someone with some bandwidth could take up this work if they were interested.

@ismena
Copy link
Contributor Author

ismena commented Aug 23, 2019

Okay. So. Here's what seems to be happening on our side:
We'll try to connect with developers at Apple, see if we can get the documentation for supporting FairPlay via MediaSource. If that happens, we'll take on finishing @chrisfillmore's PR.

In the meantime, we'll work on adding the config suggested by @avelad.

@ismena
Copy link
Contributor Author

ismena commented Aug 30, 2019

A useNativeHlsOnSafari field has been added to streamingConfiguration.
Note that it's true by default and will need to be reconfigured to get the behavior change.

@joeyparrish joeyparrish modified the milestones: Backlog, v2.6 Sep 3, 2019
@shaka-project shaka-project locked and limited conversation to collaborators Oct 29, 2019
TheModMaker pushed a commit that referenced this issue Nov 6, 2019
Closes #2116.

Change-Id: I4742037563a20e2e585a6dfbeae29a65bffe2117
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants