'; break; case 'window': $wmode = ' wmode="window" allowfullscreen="true"'; $wmode_param = ''; break; } $flashvars = 'file='. $video['file'] . $img_vars . $img_intro . $time_vars . $logo_vars . $logo_link . $repeat . '&autostart='.$video['autostart']; $output .= ''; $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://www.macromedia.com/go/getflashplayer'), t('Link to Macromedia Flash Player Download Page'), t('Download latest Flash Player')); return $output; } /** * Play Flash .swf files. * * @param $node * object with node information * * @return * string of content to display */ function theme_flashvideo_play_swf($video) { // this will be executed by not Internet Explorer browsers $output .= ''; $output .= ''; $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://www.macromedia.com/go/getflashplayer'), t('Link to Flash player download'), t('Download the latest Flash player')); return $output; } /** * Play videos hosted on youtube.com * Allows users to host videos on youtube.com and then use the video ID to post it in the module. * In the future it could also use the youtube developer API to get info and comments of the video. * * @param $video * object with node information * * @return * string of content to display */ function theme_flashvideo_play_youtube($video) { // Get the window mode $wmode = ''; $wmode_param = ''; switch(variable_get('flashvideo_' . $video['nodetype'] . '_mode', 'window')) { case 'transparent': $wmode = ' wmode="transparent"'; $wmode_param = ''; break; case 'window': $wmode = ' wmode="window" allowfullscreen="true"'; $wmode_param = ''; break; } // this will be executed by not Internet Explorer browsers $output = ''; $output .= ''; $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://www.youtube.com/t/help_center'), t('Link to youtube.com'), t('youtube.com')); return $output; } /** * Play videos hosted on video.google.com * Allows users to host videos on video.google.com and then use the video ID to post it in the module. * * @param $video * object with node information * * @return * string of content to display */ function theme_flashvideo_play_googlevideo($video) { // Strip heading "google:" $videoid = substr($video['file'], 7); // Get the window mode $wmode = ''; $wmode_param = ''; switch(variable_get('flashvideo_' . $video['nodetype'] . '_mode', 'window')) { case 'transparent': $wmode = ' wmode="transparent"'; $wmode_param = ''; break; case 'window': $wmode = ' wmode="window" allowfullscreen="true"'; $wmode_param = ''; break; } // this will be executed by not Internet Explorer browsers $output = ''; $output .= ''; $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://video.google.com/support'), t('Link to video.google.com'), t('video.google.com')); return $output; } /** * Play videos hosted on Brightcove * Allows users to host videos on brightcove.com and then use the video ID to post it in the module. * * @param $video * object with node information * * @return * string of content to display */ function theme_flashvideo_play_brightcove($video) { // Strip heading "google:" $videoid = substr($video['file'], 11); // Get the window mode $wmode = ''; $wmode_param = ''; switch(variable_get('flashvideo_' . $video['nodetype'] . '_mode', 'window')) { case 'transparent': $wmode = ' wmode="transparent"'; $wmode_param = ''; break; case 'window': $wmode = ' wmode="window" allowfullscreen="true"'; $wmode_param = ''; break; } // this will be executed by not Internet Explorer browsers $output = ''; $output .= ''; $output .= _flashvideo_get_parameters($video); $output = ''; $output .= ''; return $output; } /** * Play Director .dcr/.dir files. * * @param $node * object with node information * * @return * string of content to display */ function theme_flashvideo_play_dcr($video) { // this will be executed by not Internet Explorer browsers $output .= ''; $output .= ''; $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://www.macromedia.com/shockwave/download/'), t('Link to Macromedia Shockwave Player Download Page'), t('Download latest Shockwave Player')); return $output; } /** * Play videos from in Quicktime format * * @see http://developer.apple.com/internet/ieembedprep.html * @param $node * object with node information * * @return * string of content to display */ function theme_flashvideo_play_quicktime($video) { //Increase the height to accommodate the player controls on the bottom. // this will be executed by not Internet Explorer browsers $output = ''; $output .= ''; // only one needed becouse only one opening tag has been parsed by browsers /* Removed for now... $output = ''; */ $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://www.apple.com/quicktime/download'), t('Link to QuickTime Download Page'), t('Download latest Quicktime Player')); return $output; } /** * Play videos from in Realmedia format * * @param $node * object with node information * * @return * string of content to display */ function theme_flashvideo_play_realmedia($video) { // Real's embeded player includes the controls // in the height // this will be executed by not Internet Explorer browsers $output = ''; $output .= ''; // only one needed becouse only one opening tag has been parsed by browsers $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://www.real.com/'), t('Link to Real'), t('Download latest Realmedia Player')); return $output; } /** * Play videos from in WindowsMediaVideo format * * @param $video * object with node information * * @return * string of content to display */ function theme_flashvideo_play_windowsmedia($video) { // Windows Media's embeded player includes the controls in the height // this will be executed by not Internet Explorer browsers $output = ''; $output .= ''; // only one needed becouse only one opening tag has been parsed by browsers $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://windowsupdate.microsoft.com/'), t('Link to Windows Update'), t('Download latest Windows Media Player')); return $output; } /** * Play Ogg Theora videos with Cortado Applet * * @param $node * object with node information * * @return * string of content to display */ function theme_flashvideo_play_ogg_theora($video) { global $base_url; $cortado_location = variable_get('video_cortado', $base_url . '/cortado.jar'); $output = ''; $output = _theme_flashvideo_format_play($video['nodetype'], $output, t('http://java.com/download/'), t('Link to java.com'), t('Download Java')); return $output; } /** * Cut down on redundant link text * * @param $url * string URL to link to * * @param $title * string title of link to show on mouseover * * @param $link_text * string text of the link * * @return * string HTML link */ function _theme_flashvideo_format_play($node_type, $output, $url, $title, $link_text) { $output = '
'. t('Problems viewing videos?');
$output .= '
';
$output .= l($link_text, $url, array('title' => $title), NULL, NULL, TRUE) . '