source/Application/Model/MediaUrl.php
protected function _getYoutubeHtml()
    {
        $sUrl = $this->oxmediaurls__oxurl->value;
        $sDesc = $this->oxmediaurls__oxdesc->value;

        if (strpos($sUrl, 'youtube.com')) {
            $sYoutubeUrl = str_replace("www.youtube.com/watch?v=", "www.youtube.com/embed/", $sUrl);
            $sYoutubeUrl = preg_replace('/&amp;/', '?', $sYoutubeUrl, 1);
        }
        if (strpos($sUrl, 'youtu.be')) {
            $sYoutubeUrl = str_replace("youtu.be/", "www.youtube.com/embed/", $sUrl);
        }

        $sYoutubeTemplate = '%s<br><iframe width="425" height="344" src="%s" frameborder="0" allowfullscreen></iframe>';
        $sYoutubeHtml = sprintf($sYoutubeTemplate, $sDesc, $sYoutubeUrl, $sYoutubeUrl);

        return $sYoutubeHtml;
    }
protected function _getYoutubeHtml()
    {
        $sUrl = $this->oxmediaurls__oxurl->value;
        $sDesc = $this->oxmediaurls__oxdesc->value;

        if (strpos($sUrl, 'youtube.com')) {
            $sYoutubeUrl = str_replace("www.youtube.com/watch?v=", "www.youtube.com/embed/", $sUrl);
            $sYoutubeUrl = preg_replace('/&amp;/', '?', $sYoutubeUrl, 1);
        }
        if (strpos($sUrl, 'youtu.be')) {
            $sYoutubeUrl = str_replace("youtu.be/", "www.youtube.com/embed/", $sUrl);
        }

        $sYoutubeTemplate = '%s<br><iframe width="425" height="344" src="%s" frameborder="0" allowfullscreen></iframe>';
        $sYoutubeHtml = sprintf($sYoutubeTemplate, $sDesc, $sYoutubeUrl, $sYoutubeUrl);

        return $sYoutubeHtml;
    }
protected function _getYoutubeHtml ( ) { $ sUrl = $ this -> oxmediaurls__oxurl -> value ; $ sDesc = $ this -> oxmediaurls__oxdesc -> value ; if ( strpos ( $ sUrl , 'youtube.com' ) ) { $ sYoutubeUrl = str_replace ( "www.youtube.com/watch?v=" , "www.youtube.com/embed/" , $ sUrl ) ; $ sYoutubeUrl = preg_replace ( '/&amp;/' , '?' , $ sYoutubeUrl , 1 ) ; } if ( strpos ( $ sUrl , 'youtu.be' ) ) { $ sYoutubeUrl = str_replace ( "youtu.be/" , "www.youtube.com/embed/" , $ sUrl ) ; } $ sYoutubeTemplate = '%s<br><iframe width="425" height="344" src="%s" frameborder="0" allowfullscreen></iframe>' ; $ sYoutubeHtml = sprintf ( $ sYoutubeTemplate , $ sDesc , $ sYoutubeUrl , $ sYoutubeUrl ) ; return $ sYoutubeHtml ; }
Transforms the link to YouTube object, and returns it.

@return string
Transforms the link to YouTube object and returns it .