Bug #77409

Invalid origin for JS API enabled Youtube videos

Added by Sebastian Michaelsen about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2016-08-04
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

The YouTubeRenderer has the option enablejsapi that allows script access on the embedded Youtube video.

That is a feature provided by Youtube, which is documented here: https://developers.google.com/youtube/player_parameters#origin
As recommended the YouTubeRenderer sets the origin parameter, but it only contains the host name while in Youtube examples origin also contains the request scheme.

For me accessing the video only works when the origin is provided with request scheme.

<iframe id="ytplayer" type="text/html" width="640" height="390" src="https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&origin=example.com" frameborder="0"></iframe>
=> script access doesn't work

<iframe id="ytplayer" type="text/html" width="640" height="390" src="https://www.youtube.com/embed/M7lc1UVf-VE?autoplay=1&origin=http://example.com" frameborder="0"></iframe>
=> script access works


Related issues

Related to TYPO3 Core - Bug #77953: Bugfix only use domain with scheme for youtube origin Closed 2016-09-15

Associated revisions

Revision 84ab4133 (diff)
Added by Sebastian Michaelsen about 3 years ago

[BUGFIX] Provide full url as origin for embedded Youtube videos

To use the javascript API for embedded Youtube videos the documentation
recommends to provide the "full website url" as origin parameter

Change-Id: I318083b4c67b48c7eb708e54b11cd8dd1c69d646
Resolves: #77409
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/49416
Tested-by: Bamboo TYPO3com <>
Reviewed-by: Daniel Goerz <>
Tested-by: Daniel Goerz <>
Reviewed-by: Joerg Boesche <>
Tested-by: Joerg Boesche <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

Revision 314baf33 (diff)
Added by Sebastian Michaelsen about 3 years ago

[BUGFIX] Provide full url as origin for embedded Youtube videos

To use the javascript API for embedded Youtube videos the documentation
recommends to provide the "full website url" as origin parameter

Change-Id: I318083b4c67b48c7eb708e54b11cd8dd1c69d646
Resolves: #77409
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/49572
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

History

#1 Updated by Sebastian Michaelsen about 3 years ago

The Youtube guy also says it in the documentation video: "Use the full url of your webpage as origin"
https://youtu.be/M7lc1UVf-VE?t=17m2s

#2 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49416

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49416

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49572

#5 Updated by Anonymous about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#6 Updated by Ruud Silvrants about 3 years ago

When the request uri contains some get params the origin breaks with the youtube api.
The youtube api says: "you should always specify your domain as the origin parameter value."

For example my domain created is : //www.youtube.com/embed/YE7VzlLtp-4?autohide=1&controls=2&enablejsapi=1&origin=http://example.com/index.php?id=275&type=80001&showinfo=0.

#7 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF