function theme_video_play_flash in Video 5
Same name and namespace in other branches
- 6 includes/common.inc \theme_video_play_flash()
- 6.2 includes/common.inc \theme_video_play_flash()
- 6.3 includes/common.inc \theme_video_play_flash()
Play videos from in FLV Flash video format
Parameters
$node: object with node information
Return value
string of content to display
1 theme call to theme_video_play_flash()
- _video_common_get_player in includes/
common.inc - Get the object for the suitable player for the parameter resource
File
- includes/
common.inc, line 66 - Add some common functions for the various video types supported
Code
function theme_video_play_flash($node) {
$loader_location = variable_get('video_flvplayerloader', 'FlowPlayer.swf');
$url = _video_get_fileurl($node->vidfile);
$file = basename($url);
$base_url = substr($url, 0, strrpos($url, '/'));
$height = $node->video_scaled_y + 24;
// add commands height
// this will be executed by not Internet Explorer browsers
$output = '<!--[if !IE]> <-->
<object type="application/x-shockwave-flash" width="' . $node->video_scaled_x . '" height="' . $height . '"
data="' . url() . check_plain($loader_location) . '">
<!--> <![endif]-->' . "\n";
// this will be executed by Internet Explorer
$output .= '<!--[if IE]>
<object type="application/x-shockwave-flash" width="' . $node->video_scaled_x . '" height="' . $height . '"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<![endif]-->' . "\n";
// params will be passed to both IE or not IE browsers
$config = sprintf("config={'playerId':'player','clip':{'url':'%s'},'playlist':[{'url':'%s'}]}", $base_url . '/' . $file, $base_url . '/' . $file);
$output .= '<param name="movie" value="' . url() . check_plain($loader_location) . '" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="quality" value="high" />
<param name="flashvars" value="' . $config . '" />' . _video_get_parameters($node) . '<p>' . t('Your browser is not able to display this multimedia content.') . '</p>
</object>';
$output = theme('video_format_play', $output, t('http://get.adobe.com/flashplayer/'), t('Link to Adobe Flash Player Download Page'), t('Download latest Flash Player'));
return $output;
}