public static function getVideoData($videoid, $customimage, $customtitle, $customdescription, $thumbnailcssstyle) { //blank array $blankArray = array('videosource' => 'youtube', 'videoid' => $videoid, 'imageurl' => '', 'title' => '', 'description' => '', 'publisheddate' => '', 'duration' => 0, 'rating_average' => 0, 'rating_max' => 0, 'rating_min' => 0, 'rating_numRaters' => 0, 'statistics_favoriteCount' => 0, 'statistics_viewCount' => 0, 'keywords' => '', 'likes' => 0, 'dislikes' => '', 'commentcount' => '', 'channel_username' => '', 'channel_title' => '', 'channel_subscribers' => 0, 'channel_subscribed' => 0, 'channel_location' => '', 'channel_commentcount' => 0, 'channel_viewcount' => 0, 'channel_videocount' => 0, 'channel_description' => ''); $answer = VideoSource_YouTube::getYouTubeVideoData($videoid, $blankArray); if ($answer != '') { $blankArray['title'] = '***Video not found***'; $blankArray['description'] = $answer; return $blankArray; } if ($customtitle != '') { $blankArray['title'] = $customtitle; } if ($customdescription != '') { $blankArray['description'] = $customdescription; } if ($customimage != '' and strpos($customimage, '#') === false) { $blankArray['imageurl'] = $customimage; } else { if ($blankArray['imageurl'] == '') { $blankArray['imageurl'] = VideoSource_YouTube::getYouTubeImageURL($videoid, $thumbnailcssstyle); } } return $blankArray; }
protected static function ygFlashPlayerWithDetection($width, $height, $youtubeserver, $videoidkeyword, $settingline, &$options, $vlid, $playerid, &$theme_row, &$full_playlist, $initial_volume, $http, $playerapiid, $startsecond, $endsecond) { $showHeadScript = false; $result = '<div id="' . $playerapiid . '"></div>'; if ($options['videoid'] != '****youtubegallery-video-id****') { $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) { VideoSource_YouTube::ygFlashPlayerWithDetectionHead($width, $height, $youtubeserver, $videoidkeyword, $settingline, $options, $vlid, $playerid, $theme_row, $full_playlist, $initial_volume, $http, $playerapiid, $startsecond, $endsecond); } return $result; }