Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine srcObject's MediaSourceHandle behavior
Overall intent for a `MediaSourceHandle` is that it should be [Transferable], and be restricted to "at most one" successful attachment to the underlying `MediaSource` by a handle. Further, if a `Window` `MediaSource` was previously attached using a legacy MSE object URL, subsequent attempts to use that `MediaSource` instance's `MediaSourceHandle` for attachment must also fail. * Changes `MediaSource.getHandle()` to be a `[SameObject] readonly attribute` named `handle`. * Adds HTMLMediaElement.srcObject extension subsection. * Updates MediaSourceHandle transfer and related attachment text to more clearly indicate that transferring a handle prevents re-transfer of that instance due to the [[Detached]] internal slot's logic, and that transfer is also synchronously prevented if the handle instance's [[has ever been assigned as srcobject]] internal slot is true. Also adds multiple notes to describe intent and to clarify. * Updates the "attaching to a media element" text to indicate that a `MediaSourceHandle` can be attached successfully to at most one media element ever. Note that legacy MSE object URL attachments similarly already achieve the same intent in existing implementations. This change includes a clarification for MSE object URL attachments, since it was never the intent even for main-thread `MediaSource` attachments for them to be successfully attached to more than one `HTMLMediaElement` at a time. The switch to more clear `srcObject` usage for worker MSE attachment affords the spec an opportunity to be more clear about this intent. This refinement originates from discussion on the previous PR with @karlt (w3c#305) and from lengthy discussion on this change itself at w3c#306. This work is associated with the MSE-in-Worker spec issue: w3c#175
- Loading branch information