[BUGFIX] YouTube videos can not be played with Media CE
authorKai Vogel <kai.vogel@speedprogs.de>
Fri, 13 Jul 2012 11:31:27 +0000 (13:31 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 23 Jul 2012 17:30:57 +0000 (19:30 +0200)
Since the rework of the media content element for TYPO3 4.7, YouTube
videos cannot be played anymore using the Media CE. This patch adds
an autodetection of urls which are handled by a media wizard and sets
correct video renderer type.

Tested with youtube, vimeo, myvideo, liveleak

Change-Id: I600d94eb60a7451873835142e2019ddfd39e8deb
Fixes: #37967
Releases: 6.0, 4.7
Reviewed-on: http://review.typo3.org/12782
Reviewed-by: Marcus Schwemer
Tested-by: Marcus Schwemer
Reviewed-by: Nikolas Hagelstein
Tested-by: Nikolas Hagelstein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/cms/tslib/content/class.tslib_content_media.php

index 0537012..88df685 100644 (file)
@@ -199,6 +199,13 @@ class tslib_content_Media extends tslib_content_Abstract {
                                $conf['installUrl'] = 'null';
                                $conf['forcePlayer'] = 0;
                                $renderType = 'swf';
+                       } elseif (isset($conf['file']) && strpos($conf['file'], '://') !== FALSE) {
+                               $mediaWizard = tslib_mediaWizardManager::getValidMediaWizardProvider($conf['file']);
+                               if ($mediaWizard !== NULL) {
+                                       $conf['installUrl'] = 'null';
+                                       $conf['forcePlayer'] = 0;
+                                       $renderType = 'swf';
+                               }
                        } elseif (isset($conf['file']) && !isset($conf['caption']) && !isset($conf['sources'])) {
                                $renderType = 'swf';
                                $conf['forcePlayer'] = 1;