WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
302242
MediaSourcePrivate should be the reference when calculating the MediaPlayer's readyState
https://bugs.webkit.org/show_bug.cgi?id=302242
Summary
MediaSourcePrivate should be the reference when calculating the MediaPlayer's...
Jean-Yves Avenard [:jya]
Reported
2025-11-09 22:11:30 PST
Currently, the MediaPlayer is always the owner of the media element's readyState. When MSE is in use, the MediaSource will calculate the readyState via its monitorSourceBuffer method, then set it to the MediaSourcePrivate which then calls the MediaPlayerPrivate's setReadyState. When the MediaSource runs in a worker, this is problematic as the MediaPlayerPrivate runs in the main thread. The monitorSourceBuffer algorithm, also per spec, requires accessing the media element's readyState value For the implementation of the MSE in a worker feature, a workaround was adopted by making MediaPlayerPrivateRemote::readyState/setReady state thread-safe. We should instead have the MediaSourcePrivate::mediaPlayerReadyState() be the reference for the media element's readyState and have the MediaPlayer queries the MediaSourcePrivate when present. This allows for a common, platform-agnostic, thread-safe implementation of readyState() method which will ease moving the MediaPLayedPrivateMediaSourceAVFObjC in the content process.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-11-09 22:11:37 PST
<
rdar://problem/164381937
>
Jean-Yves Avenard [:jya]
Comment 2
2025-11-11 15:40:54 PST
Pull request:
https://github.com/WebKit/WebKit/pull/53777
EWS
Comment 3
2025-11-20 23:52:08 PST
Committed
303379@main
(ae8698d30174): <
https://commits.webkit.org/303379@main
> Reviewed commits have been landed. Closing PR #53777 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug