cross-origin Mp4 Videos not played when loaded as document in iFrame
Categories
(Core :: Audio/Video: Playback, defect, P1)
Tracking
()
People
(Reporter: jonathan.fuchs, Assigned: karlt)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
diannaS
:
approval-mozilla-release+
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
diannaS
:
approval-mozilla-release+
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
diannaS
:
approval-mozilla-release+
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Steps to reproduce:
Embedded a video in an iFrame. Format is mp4. If I play the video with a normal video tag it works fine but not if its inside an iFrame. See below
https://jsfiddle.net/jonny_fux/d2b6c5af/11/
Actual results:
Error: No Video with supported format and MIME type found
Expected results:
The video should be played. That works in Safari and Chromium Browsers.
Comment 1•3 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e15164d8b4c6de1bbb016649e32bd63797a7453a&tochange=56757e00ffb4fbea5c67b67d86d081949065dd6d
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
:karlt, since you are the author of the regressor, bug 1735923, could you take a look?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Using "Select an iframe as the currently targeted document" in the Web Developer Tools Console, document.getElementsByTagName("video")[0].error.message
is "NS_ERROR_CONTENT_BLOCKED (0x805e0006) - opaque and non-opaque responses".
Assignee | ||
Comment 4•2 years ago
|
||
https://pernos.co/debug/d5WGdM2t5qWmAYj9BsVzyw/index.html
https://treeherder.mozilla.org/jobs?repo=try&revision=84fa975973374ebba2e1a61a33fa7920b6abcf19
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
When the media resource is loaded as a document, the response from the initial
document load gets reused, as an optimization, as an emulated load for the
resource of the media host element in the generated HTML document.
https://searchfox.org/mozilla-central/rev/5644fae86d5122519a0e34ee03117c88c6ed9b47/dom/html/VideoDocument.cpp#114
https://html.spec.whatwg.org/multipage/browsing-the-web.html#read-media
The loadingPrincipal of the initial channel comes from the parent document,
and so is not useful to determine whether the response is cross-origin with
the media element.
This change makes the cross-origin test on the initial document load
consistent with subsequent requests on the same resource and non-document
loads, which already use the node principal for the loadingPrincipal.
https://searchfox.org/mozilla-central/rev/1061fae5e225a99ef5e43dbdf560a91a0c0d00d1/dom/media/ChannelMediaResource.cpp#750
https://searchfox.org/mozilla-central/rev/4f2984be127d2e7c788cf1848d63dca63022beec/dom/html/HTMLMediaElement.cpp#1708
Depends on D154039
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D154040
Updated•2 years ago
|
Updated•2 years ago
|
Comment 9•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 5 See Also bugs.
:karlt, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Comment 12•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4f56c42c36e7
https://hg.mozilla.org/mozilla-central/rev/69937c47da4b
https://hg.mozilla.org/mozilla-central/rev/b820ae7bac8d
Updated•2 years ago
|
Assignee | ||
Comment 14•2 years ago
|
||
Comment on attachment 9288955 [details]
Bug 1781759 use media element node principal instead of channel loading principal for cross-origin resource test r?edenchuang
Beta/Release Uplift Approval Request
- User impact if declined: Some videos or audio do not play sometimes or always when loaded into a cross-origin iframe.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change is small and affects only media loaded as a document, which is currently often refusing to play.
- String changes made/needed: None.
- Is Android affected?: Yes
Assignee | ||
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Comment on attachment 9288954 [details]
Bug 1781759 factor out ChannelMediaResource::MediaElement() helper r?chunmin
Approved for 105.0b3.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 17•2 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 19•2 years ago
|
||
[Tracking Requested - why for this release]:
Regression on 102 branch.
ESR91 is affected but https://fx-trains.herokuapp.com/release/?version=esr says there are no more ESR91 releases to come.
Assignee | ||
Comment 20•2 years ago
|
||
Comment on attachment 9288955 [details]
Bug 1781759 use media element node principal instead of channel loading principal for cross-origin resource test r?edenchuang
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: This fixes a regression introduced in 102.
- User impact if declined: Some videos or audio do not play sometimes or always when loaded into a cross-origin iframe.
- Fix Landed on Version: 106 and uplifted to 105
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change is small and affects only media loaded as a document, which is currently often refusing to play.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 21•2 years ago
|
||
Comment on attachment 9288955 [details]
Bug 1781759 use media element node principal instead of channel loading principal for cross-origin resource test r?edenchuang
Beta/Release Uplift Approval Request
- User impact if declined: Most videos or audio do not play sometimes or always when loaded into a cross-origin iframe.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change is small and affects only media loaded as a document, which is currently often refusing to play.
- String changes made/needed: None.
- Is Android affected?: Yes
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Hello,
I managed to reproduce this issue on FIrefox 104.0(build ID: 20220818191623) on Ubuntu 22.04, using the STR and URL from the Description. Verified as fixed on FIrefox 105.0b4(build ID: 20220828190315) and Nightly 106.0a1(build ID: 20220828210513) on Ubuntu 22.04, macOS 12, WIndows 10.
Comment 23•2 years ago
|
||
Comment on attachment 9288954 [details]
Bug 1781759 factor out ChannelMediaResource::MediaElement() helper r?chunmin
Approved for 102.3esr.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 24•2 years ago
|
||
bugherder uplift |
Hello,
I confirm this fix is verified on Firefox 102.3.0esr(build ID: 20220829144321) on macOS 12, Ubuntu 22.04, Windows 10.
Comment 26•2 years ago
|
||
Comment on attachment 9288954 [details]
Bug 1781759 factor out ChannelMediaResource::MediaElement() helper r?chunmin
Approved for 104.0.2
Updated•2 years ago
|
Updated•2 years ago
|
Comment 27•2 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Comment 28•2 years ago
|
||
I have verified the fix on Firefox 104.0.2 (20220901135416)
Description
•