function theme_video_play_windowsmedia in Video 6.2
Same name and namespace in other branches
- 5 includes/common.inc \theme_video_play_windowsmedia()
- 6 includes/common.inc \theme_video_play_windowsmedia()
- 6.3 includes/common.inc \theme_video_play_windowsmedia()
Play videos from in WindowsMediaVideo format
Parameters
$node: object with node information
Return value
string of content to display
1 theme call to theme_video_play_windowsmedia()
- _video_common_get_player in includes/
common.inc - Get the object for the suitable player for the parameter resource
File
- includes/
common.inc, line 342 - Add some common functions for the various video types supported
Code
function theme_video_play_windowsmedia($node) {
// Windows Media's embeded player includes the controls in the height
$node->video_scaled_y += 68;
$url = _video_get_fileurl($node->vidfile);
// this will be executed by not Internet Explorer browsers
$output = '<!--[if !IE]> <-->
<object type="application/x-mplayer2" width="' . $node->video_scaled_x . '" height="' . $node->video_scaled_y . '"
data="' . $url . '">
<!--> <![endif]-->' . "\n";
// this will be executed by Internet Explorer
$output .= '<!--[if IE]>
<object type="application/x-oleobject" width="' . $node->video_scaled_x . '" height="' . $node->video_scaled_y . '"
classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" >
<![endif]-->' . "\n";
// params will be passed to both IE or not IE browsers
$output .= '<param name="src" value="' . $url . '" />
<param name="URL" value="' . $url . '" />
<param name="animationatStart" value="true" />
<param name="transparentatStart" value="true" />
<param name="autoStart" value="' . (variable_get('video_autoplay', TRUE) ? 'true' : 'false') . '" />
<param name="showControls" value="true" />
<param name="loop" value="true" />' . _video_get_parameters($node) . '<p>' . t('Your browser is not able to display this multimedia content.') . '</p>
</object>';
// only one </object> needed becouse only one opening tag has been parsed by browsers
$output = "\n<div id=\"video-player\">\n" . $output;
$output .= "<p>\n" . t('Problems viewing videos?');
$output .= "<br />\n";
$output .= l(t('Download latest Windows Media Player'), t('http://windowsupdate.microsoft.com/'), array(
'attributes' => array(
'title' => t('Link to Windows Update'),
),
'absolute' => TRUE,
));
//GMM: add link to Windows Media Player plug-in for Firefox browsers
$output .= "<br />\n";
$output .= l(t('Download the plug-in for Firefox'), t('http://support.mozilla.com/en-US/kb/Using+the+Windows+Media+Player+plugin+with+Firefox'), array(
'attributes' => array(
'title' => t('Link to Firefox Plug-in'),
),
'absolute' => TRUE,
));
$output .= "\n</p> \n </div>\n";
return $output;
}