Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

360 YouTube videos do not work when embedded using iframe. #870

Closed
caseyyee opened this issue Nov 28, 2018 · 6 comments · Fixed by #2487
Closed

360 YouTube videos do not work when embedded using iframe. #870

caseyyee opened this issue Nov 28, 2018 · 6 comments · Fixed by #2487
Assignees
Labels
Bugzilla Main activity on this bug is in Bugzilla compatibility Web content compatibility issues
Milestone

Comments

@caseyyee
Copy link
Contributor

caseyyee commented Nov 28, 2018

Hardware

Go
1.1

Steps to Reproduce

  1. Some sites examples with embedded YouTube 360 videos:
    http://prosperxr.com/vrportfolio#gameover
    https://www.leliomoehr.com/360-vr

  2. Click "Watch"

Current Behavior

360 video plays back with 2D pan controls and will not display correctly in VR modes.

Expected Behavior

YouTube should play back in unwrapped 360 video that will work with VR video modes.

Possible Solution

My guess is that the iframe'd YouTube is not seeing customized UA string that plays the video back in unwrapped 360 player.

@caseyyee caseyyee added the compatibility Web content compatibility issues label Nov 28, 2018
@caseyyee caseyyee changed the title YouTube embeds (with iframe) show pan controls for 360 videos. 360 YouTube videos do not work when embedded using iframe. Nov 28, 2018
@bluemarvin
Copy link
Contributor

This is probably due to a limitation of the UA override code in GeckoView since it only overrides the UA for the root content window.

@cvan cvan added this to the v1.2 milestone Dec 11, 2018
@cvan
Copy link
Contributor

cvan commented Dec 11, 2018

@cvan cvan added blocked P4 This priority is for platform test bots (do not manually assign) labels Dec 11, 2018
@cvan cvan modified the milestones: v1.1.1, v1.2 Dec 19, 2018
@philip-lamb philip-lamb added Bugzilla Main activity on this bug is in Bugzilla P3 Backlog and removed P4 This priority is for platform test bots (do not manually assign) blocked labels Apr 5, 2019
@philip-lamb
Copy link
Contributor

https://bugzilla.mozilla.org/show_bug.cgi?id=1511281 is resolved fixed. @cvan please test.

@philip-lamb philip-lamb modified the milestones: v1.2, v1.3 May 16, 2019
@jvonitter jvonitter added the QA Attention QA label May 16, 2019
@philip-lamb philip-lamb modified the milestones: v1.3, v1.x May 20, 2019
@philip-lamb
Copy link
Contributor

Into 1.x as we have a supported path on youtube for now which involves an extra click to break out of the youtube embedded player.

@cvan
Copy link
Contributor

cvan commented May 21, 2019

I can still reproduced this:

I haven't investigated too much further, but the embedded <iframe> will always need to include allowfullscreen (also allow="autoplay; encrypted-media"):

<!-- 2D -->
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

<!-- 360 -->
<iframe width="560" height="315" src="https://www.youtube.com/watch?v=JL6NAIVpl54&mozVideoProjection=360_auto" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

<!-- 2D (no cookies) -->
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/videoseries?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

<!-- 360 (no cookies)
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/watch?v=JL6NAIVpl54&mozVideoProjection=360_auto" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

To fix this, this will likely require changes to the YouTube Web Extension content script to not filter on /watch URLs, and to wait for the player to load within the <iframe>. Will probably need to listen for some YouTube-specific events and window.onmessage (and likely need to postMessage back and forth).

Also, try modifying in the manifest.json file, the run_at key to be "document_idle" or "document_end".

And, for reference: in the manifest.json file, the all_frames key when true applies to all frames/<iframe>s that are not the document's parent window, and false applies such that the content script is injected for only the document's parent window.

@Softvision-GeluHaiduc
Copy link

I will remove the QA label for now as there is nothing actionable by QA.
If QA attention is needed in the future please add the label again and we will address it.

@Softvision-GeluHaiduc Softvision-GeluHaiduc removed the QA Attention QA label Oct 3, 2019
@jvonitter jvonitter modified the milestones: Backlog, #8 features Dec 2, 2019
@MortimerGoro MortimerGoro self-assigned this Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bugzilla Main activity on this bug is in Bugzilla compatibility Web content compatibility issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants