Bug 302242
| Summary: | MediaSourcePrivate should be the reference when calculating the MediaPlayer's readyState | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=302514 | ||
Jean-Yves Avenard [:jya]
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
<rdar://problem/164381937>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/53777
EWS
Committed 303379@main (ae8698d30174): <https://commits.webkit.org/303379@main>
Reviewed commits have been landed. Closing PR #53777 and removing active labels.