-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSE-in-Workers: srcObject part 4: media element use of handle
Adds ability to attach a dedicated-worker-owned MediaSource to an HTMLMediaElement using a MediaSourceHandle for that MediaSource instance that the app has posted over to the main thread and assigned to the srcObject attribute on the media element. Previously, only a MediaStream could be set as a srcObject in Chrome. This change adds the relevant MediaProvider IDL union type and makes it the type of that srcObject attribute. For historical reasons, the srcObject attribute of an HTMLMediaElement is implemented in modules as a partial interface; this change updates that partial interface as well as the media element implementation to enable the scenario without regressing existing ability to use MediaStream as media element's srcObject. The attachment of the worker MediaSource using the handle does not involve lookup into a URL registry; rather, an internal blob URL is built into the handle when it was retrieved from the MediaSource and that URL is used to satisfy existing media element load safety checks as well as provide the underlying WebMediaPlayer a URL that it can use when logging to devtools. Later changes will add further test updates and remove the previous ability to attach a worker MediaSource using a registered object URL. References: Full prototype CL: https://chromium-review.googlesource.com/c/chromium/src/+/3515334 MSE spec issue: w3c/media-source#175 MSE spec feature updates switching from worker MSE attachment via object URL to attachment via srcObject MediaSourceHandle: * w3c/media-source#305 * further clarifications in discussion at w3c/media-source#306 (comment) crbug.com/506273 is somewhat related, but not fixed by this change (it refers to directly setting MediaSource on Window context to the media element's srcObject attribute.) This change sequence is specific to enabling MSE-in-Worker attachment via srcObject using a handle object. BUG=878133,506273 Change-Id: I86cddd87bafae1c7cbae9e94ea4614418067012f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688740 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Elad Alon <eladalon@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1012202} NOKEYCHECK=True GitOrigin-RevId: 756af69b67c9e40e0a0c92cb6c0a911c96ea6835
- Loading branch information
1 parent
953554f
commit 3e623fe
Showing
15 changed files
with
257 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.