Project

General

Profile

Bug #33090 » youtube-video_forge-33090.patch

Stefan Neufeind, 2014-05-30 14:49

View differences:

typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php 2014-05-30 14:03:37.659999938 +0200
$conf['forcePlayer'] = 0;
$renderType = 'swf';
}
$urlRewritten = $mediaWizard->rewriteUrl($conf['file']);
if(strpos($urlRewritten, 'www.youtube.com') !== FALSE) {
$renderType = 'iframe';
}
} elseif (isset($conf['file']) && !isset($conf['caption']) && !isset($conf['sources'])) {
$renderType = 'swf';
$conf['forcePlayer'] = 1;
}
}
switch ($renderType) {
case 'iframe':
$url = $urlRewritten;
$width = $conf['parameter.']['mmWidth'] ?: 640;
$height = $conf['parameter.']['mmHeight'] ?: 385;
$frameBorderAttribute = ' style="border:0px"';
// literally taken from EXT:news/Classes/MediaRenderer/Video/Youtube.php
$content = '<iframe width="' . (int)$width . '" height="' . (int)$height . '" src="' . htmlspecialchars($url) . '"' . $frameBorderAttribute . '></iframe>';
break;
case 'flowplayer':
$conf[$conf['type'] . '.'] = array_merge((array) $conf['mimeConf.']['flowplayer.'][($conf['type'] . '.')], $typeConf);
$conf = array_merge((array) $conf['mimeConf.']['flowplayer.'], $conf);
(3-3/4)