Bug 274195

Summary: [MSE] If src attribute is defined, ignore source alternative
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: MediaAssignee: 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=274142

Jean-Yves Avenard [:jya]
Reported 2024-05-14 21:03:55 PDT
Per spec, if a media element has a src attribute defined, `<source>` are ignored [1] as a consequence of the media source selection algorithm [2] step 6: ``` ⌛ If the media element has an assigned media provider object, then let mode be object. ⌛ Otherwise, if the media element has no assigned media provider object but has a src attribute, then let mode be attribute. ⌛ Otherwise, if the media element does not have an assigned media provider object and does not have a src attribute, but does have a source element child, then let mode be children and let candidate be the first such source element child in tree order. ``` Currently, to check if we have a remote playback alternative, we only check if a playable alternative source is defined, and if so allow playback. But if a src (or srcObject) is defined, when selecting an AirPlay target those sources will be ignored. So we need HTMLMediaElement::hasWirelessPlaybackTargetAlternative() to return false unless `m_loadState != LoadingFromSourceElement` [1] https://html.spec.whatwg.org/multipage/media.html#attr-media-src [2] https://html.spec.whatwg.org/multipage/media.html#concept-media-load-algorithm
Attachments
Jean-Yves Avenard [:jya]
Comment 1 2024-05-14 23:11:57 PDT
Jean-Yves Avenard [:jya]
Comment 2 2024-05-14 23:22:14 PDT
EWS
Comment 3 2024-05-15 16:31:39 PDT
Committed 278834@main (fb01f8840fd2): <https://commits.webkit.org/278834@main> Reviewed commits have been landed. Closing PR #28584 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.