Bug #33090
closedNew way to embed youtube videos
Added by Robert Heel almost 13 years ago. Updated over 8 years ago.
0%
Description
youtube has a new way to embed videos:
http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
It automatically uses html5 if the device can't use flash. But it's not easy to integrate this in the current TYPO3 media element.
Files
media_iframe.diff (859 Bytes) media_iframe.diff | Robert Heel, 2012-01-10 13:51 | ||
33090_media_iframe.diff (872 Bytes) 33090_media_iframe.diff | Robert Heel, 2012-01-12 13:08 | ||
youtube-video_forge-33090.patch (1.31 KB) youtube-video_forge-33090.patch | Stefan Neufeind, 2014-05-30 14:49 | ||
youtube-video_forge-33090_4.5.34.patch (1.52 KB) youtube-video_forge-33090_4.5.34.patch | Youtube via iframe, against 4.5.34 | Stefan Neufeind, 2014-08-08 08:14 |
Updated by Robert Heel almost 13 years ago
- File media_iframe.diff media_iframe.diff added
Attached a workaround which bypass the generation on youtube links.
Updated by Robert Heel almost 13 years ago
- File 33090_media_iframe.diff 33090_media_iframe.diff added
Added wmode=Opaque to avoid flash overlay
Updated by Robert Heel almost 13 years ago
... or wmode=transparent ...
http://stackoverflow.com/questions/4050999/youtube-iframe-wmode-issue
Updated by Stefan Neufeind over 10 years ago
This is still an issue in latest TYPO3 CMS (6.2.3). Embedding by using an iframe seems to be the best way.
Here is a slightly different patch, patch also using an iframe.
Of course all these ways are just "hacks" to get it working for the moment. Imho we need to cleanly extend the concept of MediaProviders to fit the new needs - which here is APIs that need iframes and don't allow access to the videos directly anymore.
Updated by Stefan Neufeind over 10 years ago
- Tracker changed from Feature to Bug
- Subject changed from New way to embed youtube videos with html5 to work on ipad to New way to embed youtube videos
Updated by Markus Klein over 10 years ago
- Is Regression set to No
I agree we need to restructure the Media Providers a lot. Currently you can only modify the path to videos within a provider. IMO a provider should be much more general. Meaning it should be capable of rendering the whole html output and providing also adequate fields in the backend. The html should be fluid based. A provider should be an adapter between the Core and the source API, like YouTube or Vimeo.
Updated by Stefan Neufeind over 10 years ago
Could we maybe agree on some "hack" to get youtube working again with one of the next releases? I doubt that a full restructuring will arrive in the short run - and even then it would need a decision if such a "new" MediaProvider-interface can be introducted in the 6.2.x-branch.
Updated by Markus Klein over 10 years ago
From what I saw, I can tell that after the current media provider parses and rewrites the youtube url it uses the default SWFOJECT rendering of cObj (object-embed HTML code)
I don't have time currently to take a closer look how we could "hack" that now to get an iframe in 6.2.
By the way: Youtube is NOT broken currently, after applying the fix https://review.typo3.org/29952
Updated by Stefan Neufeind over 10 years ago
Oh yes, that patch went in after 6.2.3-release. I just tried it out. Works fine on a machine where you have Flash available. For things like an an ipad that of course fails - in contrast to the iframe-embededing directly from youtube (which detects HTML5-capable players).
Updated by Markus Klein over 10 years ago
Yep of course. iframe player detection is much more intelligent!
Updated by Stefan Neufeind over 10 years ago
Attached is the same patch/hack for using Youtube via iframe, redone against 4.5.34
Updated by Johannes C. Schulz about 10 years ago
Is there some magic to do within the plugin? I patched my 6.2.4 but youtube in media-element remains SWFOBJECT ínstead of IFRAME.
Updated by Stefan Neufeind about 10 years ago
No magic involved. Then please check the source again. What URLs does the mediaprovider return for you, is the mode correctly set to iframe etc.?
Updated by Johannes C. Schulz about 10 years ago
My plugin-settings:
Medientyp: Video
HTML5: nein
Breite:
Höhe:
Darstellungstyp: auto
URL: http://youtu.be/anM5lsLPwPE
in MediaContentObject.php I've changed:
$urlRewritten = $mediaWizard->rewriteUrl($conf['file']); if( (strpos($urlRewritten, 'www.youtube.com') !== FALSE) || (strpos($urlRewritten, 'youtu.be') !== FALSE) ) { $renderType = 'iframe'; }
PageContent is:
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/anM5lsLPwPE?fs=1" width="600" height="400" id="mmswf53fedb6e1c783" style="visibility: visible;"><param name="quality" value="high"><param name="menu" value="false"><param name="allowScriptAccess" value="sameDomain"><param name="allowFullScreen" value="true"><param name="wmode" value="opaque"></object>
There is no option "IFRAME" inside the plugin.
Johannes
Updated by Stefan Neufeind about 10 years ago
Well, you missed the second half of the patch ...
Updated by Johannes C. Schulz about 10 years ago
No ;-) - It's also there.
case 'iframe': $url = $urlRewritten; $width = $conf['parameter.']['mmWidth'] ?: '100%'; $height = $conf['parameter.']['mmHeight'] ?: '100%'; $frameBorderAttribute = ' style="border:0px"'; // literally taken from EXT:news/Classes/MediaRenderer/Video/Youtube.php $content = '<div class="wrapper"><div class="h_iframe"><iframe width="' . $width . '" height="' . $height . '" src="' . htmlspecialchars($url) . '"' . $frameBorderAttribute . '></iframe></div></div>'; break;
Updated by Benni Mack almost 10 years ago
- Assignee set to Benni Mack
- Target version set to 7.2 (Frontend)
Updated by Markus Klein almost 10 years ago
See extension of Frans which shall be the new way to do it.
https://github.com/fsaris/fal_online_media_connector
Updated by Benni Mack over 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog over 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Benni Mack about 9 years ago
- Category changed from 1050 to 1606
- Target version deleted (
7.5)
Updated by Georg Ringer about 9 years ago
TYPO3 CMS 7 now can handle that in a nice way without flash. therefore I am closing this issue.
Updated by Georg Ringer about 9 years ago
- Status changed from New to Closed
feel free however to open new issue for this ext at https://github.com/FriendsOfTYPO3/mediace/issues/
Updated by Alexander Dick over 8 years ago
The wmode parameter should be added to the urlParams.
If the browser supports flash or it is an older browser that doesn't support html5 videos, youtube still uses flash.
sysext/core/Classes/Resource/Rendering/YouTubeRenderer.php
public function render(FileInterface $file, $width, $height, array $options = null, $usedPathsRelativeToCurrentScript = false) { [...] $urlParams = array('wmode=transparent', 'autohide=1'); [...]
The result:
<iframe src="//www.youtube.com/embed/XXXVideoIDXXX?autohide=1&wmode=transparent&controls=2&enablejsapi=1&origin=domain.tld&showinfo=0" allowfullscreen frameborder="0" title=""></iframe>
Updated by Markus Klein over 8 years ago
Alexander, this ticket is closed. Please open a new one.