-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ManagedMediaSource Support #5542
Conversation
b22be3f
to
403c49f
Compare
src/utils/mediasource-helper.ts
Outdated
@@ -4,5 +4,9 @@ | |||
|
|||
export function getMediaSource(): typeof MediaSource | undefined { | |||
if (typeof self === 'undefined') return undefined; | |||
return self.MediaSource || ((self as any).WebKitMediaSource as MediaSource); | |||
return ( | |||
((self as any).ManagedMediaSource as typeof MediaSource) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the API already available on Webkit ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is available on Safari 17 and iPadOS 17 beta
d76c81f
to
e0de517
Compare
e0de517
to
3e67c19
Compare
src/controller/buffer-controller.ts
Outdated
// link video and media Source | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also test for WebKitPlaybackTargetAvailabilityEvent
here before bothering to use source
elements.
Hi! TY so much for sharing this PR. If you need help to finish this PR please let me know! |
Hi @JuanMorenoS, ManagedMediaSource needs to be enabled via Settings > Safari > Advanced > Feature Flags > Managed Media Source API. There is a known issue in iOS 17 beta 5 preventing the |
More details available in this nice video: https://developer.apple.com/videos/play/wwdc2023/10122/ |
3e67c19
to
754951b
Compare
9a9ea70
to
6337b81
Compare
6337b81
to
813d259
Compare
813d259
to
432a62d
Compare
Hi @robwalch , I was wondering if you've heard any updates about the issue in iOS 17? It's been released, but I'm still having trouble playing content with HLS.JS. Any help would be appreciated |
It will be available in iOS 17.1 beta 2 |
This PR will...
preferManagedMediaSource
config option which defaults totrue
. Set tofalse
to use standardMediaSource
when available even if MMS is present.pauseBuffering()
andresumeBuffering()
(unlike
startLoad()
andstopLoad()
, these methods do not interrupt Playlist loading)media.disableRemotePlayback
totrue
to allow ManagedMediaSource to open (users can add additional source elements and allow remote playback as needed).preferManagedMediaSource
tofalse
prevents this behaviorWhy is this Pull Request needed?
Using ManagedMediaSource when available allows the User Agent to manage buffer levels and limit quality based on information not available to the page.
Are there any points in the code the reviewer needs to double check?
ManagedMediaSource explainer: w3c/media-source#320