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
274195
[MSE] If src attribute is defined, ignore source alternative
https://bugs.webkit.org/show_bug.cgi?id=274195
Summary
[MSE] If src attribute is defined, ignore source alternative
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
Add attachment
proposed patch, testcase, etc.
Jean-Yves Avenard [:jya]
Comment 1
2024-05-14 23:11:57 PDT
rdar://128098363
Jean-Yves Avenard [:jya]
Comment 2
2024-05-14 23:22:14 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/28584
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.
Top of Page
Format For Printing
XML
Clone This Bug