-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Native HLS on Safari only for AirPlay #5022
Comments
@niklaskorz are you interested on send a PR for this? |
More info in https://developer.apple.com/wwdc23/10122 |
I suppose I could work on #5271 and this in a combined PR @avelad, as the "new" AirPlay approach is explicitly mentioned in the context of Managed MSE. Interestingly the hls.js PR video-dev/hls.js#5542 does not seem to have any AirPlay specific changes. |
After having merged #5683 this development has been unlocked. |
@niklaskorz are you interested on send a PR for this? |
This snippet from the WebKit blog uses // Add MSE/MMS streaming source
const videoSource1 = document.createElement('source');
videoSource1.type = 'video/mp4';
videoSource1.src = URL.createObjectURL(source); // Create URL from MediaSource
video.appendChild(videoSource1);
// Add AirPlay-compatible HLS source
const videoSource2 = document.createElement('source');
videoSource2. type = 'application/x-mpegURL';
videoSource2.src = airplayURL;
video.appendChild(videoSource2); We could do this, but we have to be careful to track those |
Needed for #5022 This PR does not enable AirPlay on MSE yet, but moves shaka from using `src` attribute to `source` tags. With this change we will be able to enable it more easily, as `src` and `source` should not be used together.
Have you read the FAQ and checked for duplicate open issues?
Yes
Is your feature request related to a problem? Please describe.
When using AirPlay on Safari with
useNativeHlsOnSafari: false
, AirPlay becomes unusable. This is because the blob source set on the video element cannot be handled by the AirPlay target.Describe the solution you'd like
As of Safari 16.4, Safari can automatically fall back to another supported
<source>
element when starting AirPlay. An example is provided by this test in the WebKit repository. The basic idea would be to provide both the Media Source Extensions-backed video blob and the address of the HLS playlist as separate<source>
elements as children of the<video>
element.Describe alternatives you've considered
An alternative would be to re-enable
useNativeHlsOnSafari
when AirPlay is requested by the user, seek to the previous timestamp and start playback again.The text was updated successfully, but these errors were encountered: