Exemplo n.º 1
0
    protected static function ygHTML5PlayerAPI($width, $height, $youtubeserver, $videoidkeyword, $settingline, &$options, $vlid, $playerid, &$theme_row, &$full_playlist, $initial_volume, $playerapiid, $withFlash = false)
    {
        $showHeadScript = false;
        // IFrame API Player
        $result = '<div id="' . $playerapiid . 'api"></div>';
        if ($options['videoid'] != '****youtubegallery-video-id****') {
            if (!$withFlash) {
                $result .= '
			<script type="text/javascript">
			//<![CDATA[
				ygCurrentVideoID' . $vlid . '="' . $options['videoid'] . '";
				youtubegallery_updateplayer_youtube_' . $vlid . '("' . $options['videoid'] . '",false);
			//]]>
			</script>
			';
            }
            $showHeadScript = true;
        } else {
            $result .= '<!--DYNAMIC PLAYER-->';
        }
        if ($showHeadScript) {
            $result .= VideoSource_YouTube::ygHTML5PlayerAPIHead($width, $height, $youtubeserver, $videoidkeyword, $settingline, $options, $vlid, $playerid, $theme_row, $full_playlist, $initial_volume, $playerapiid, $withFlash);
        }
        /*
        if($showHeadScript)
        {
        $result.='
        <script>
        	ygCurrentVideoID'.$vlid.'="'.$options['videoid'].'";
        </script>
        ';
        }
        */
        return $result;
    }