Bug 274195
| Summary: | [MSE] If src attribute is defined, ignore source alternative | ||
|---|---|---|---|
| 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=274142 | ||
Jean-Yves Avenard [:jya]
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]
rdar://128098363
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/28584
EWS
Committed 278834@main (fb01f8840fd2): <https://commits.webkit.org/278834@main>
Reviewed commits have been landed. Closing PR #28584 and removing active labels.