[TYPO3-v4] How to insert YouTube video in 4.7?

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jan 23 21:36:22 CET 2012


Stanislas Rolland schrieb am 23.01.2012 19:46:

> Regarding backward comptibility, the video/audio files specified in
> earlier versions should be rendered as fallback files. However, I think
> that in the development process, the fact that flowplayer does not
> support YouTube and other popular video sources was overlooked while,
> obviouly, these sources will not be rendered in HTML5. Perhaps the media
> element should be rendered the way it was before when the video/audio
> source is specified as an url that does not lead to a media file.

That sounds like a good compromise.

What was called "Path or URL" in the flexform in 4.5 and 4.6 is now
called "Path or URL to fallback video source (Flash or QuickTime)". Both
stored in the same FF field (at least it won't be dropped during the
upgrade): sDEF.lDEF.mmFile.

The previous idea (4.5 - 4.6) was that the editor could enter "anything"
in this field (be it an URL he copied from Youtube or a reference to a
local file), the "media wizard" would find the correct code for it.

I am not 100% satisfied with how it works in 4.5 (it should do more
"magic" like not trying to use the flowplayer if the URL is supported by
some media wizard provider - e.g. Youtube), but this is yet another topic.

Some rought idea on how to solve it:

Rephrase "Path or URL to fallback video source (Flash or QuickTime)"
into: "Path or URL (fallback video source or original video URL)" and
have the "media wizard provider" be called to check if this URL can be
handled before doing the "new stuff":

$mediaWizard = tslib_mediaWizardManager::getValidMediaWizardProvider($url);
if ($mediaWizard !== NULL && $mediaWizard->canHandle($url)) {
    // then do the old-style MEDIA rendering...
}

It's a bit a shame that the new implementation hasn't really looked on
how the current methods work in order to consider it from start. :(

Cheers,
Ernesto


More information about the TYPO3-project-v4 mailing list