array(
'url' => $video,
//TODO: Make settings for this
'autoPlay' => variable_get('video_autoplay', TRUE), // Turn autoplay off
'autoBuffering' => variable_get('video_autobuffering', TRUE),
),
),
$id, array(
'style' => "width: $width; height: $height",
)
);
}
else {
$output='
Use SwfTools Module to play FLV files if you only convert/upload FLV videos or FlowPlayer Module must be enabled in order to play FLV videos with other types.
';
}
return $output;
}
/**
* Play Flash .swf files.
*
* @param $node
* object with node information
*
* @return
* string of content to display
*/
function theme_video_play_swf($element) {
$video = file_create_url($element['#item']['filepath']);
$width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : '';
$height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : '';
$width = empty($width) ? '350px' : $width .'px';
$height = empty($height) ? '285px' : $height .'px';
// this will be executed by not Internet Explorer browsers
$output = '
';
/*
$output = theme('video_format_play', $output, t('http://www.macromedia.com/go/getflashplayer'), t('Link to Flash player download'), t('Download the latest Flash player'));*/
return $output;
}
/**
* Play Director .dcr/.dir files.
*
* @param $node
* object with node information
*
* @return
* string of content to display
*/
function theme_video_play_dcr($element) {
$video = file_create_url($element['#item']['filepath']);
$width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : '';
$height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : '';
$width = empty($width) ? '350px' : $width .'px';
$height = empty($height) ? '285px' : $height .'px';
// this will be executed by not Internet Explorer browsers
$output = '
';
/*
$output = theme('video_format_play', $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 DivX format
*
* @see http://developer.apple.com/internet/ieembedprep.html
* @param $node
* object with node information
*
* @return
* string of content to display
*/
function theme_video_play_divx($element) {
//Increase the height to accommodate the player controls on the bottom.
$video = file_create_url($element['#item']['filepath']);
$width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : '';
$height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : '';
$width = empty($width) ? '350px' : $width .'px';
$height = empty($height) ? '285px' : $height .'px';
//$url = _video_get_fileurl($node->vidfile);
$output = '
needed becouse only one opening tag has been parsed by browsers
return $output;
}
/**
* Play videos from in Realmedia format
*
* @param $node
* object with node information
*
* @return
* string of content to display
*/
function theme_video_play_realmedia($element) {
// Real's embeded player includes the controls
// in the height
$video = file_create_url($element['#item']['filepath']);
$width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : '';
$height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : '';
$width = empty($width) ? '350px' : $width .'px';
$height = empty($height) ? '285px' : $height .'px';
// this will be executed by not Internet Explorer browsers
$output = '
' . "\n";
// this will be executed by Internet Explorer
$output .= '' . "\n";
// params will be passed to both IE or not IE browsers
$output .= '
'
. //_video_get_parameters($node) .
'
'. t('Your browser is not able to display this multimedia content.') .'
'; // only one needed becouse only one opening tag has been parsed by browsers
/*
$output = theme('video_format_play', $output, t('http://www.real.com/'),
t('Link to Real'),
t('Download latest Realmedia Player'));*/
return $output;
}
/**
* Play videos from in WindowsMediaVideo format
*
* @param $node
* object with node information
*
* @return
* string of content to display
*/
function theme_video_play_windowsmedia($element) {
// Windows Media's embeded player includes the controls in the height
$video = file_create_url($element['#item']['filepath']);
$width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : '';
$height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : '';
$width = empty($width) ? '350px' : $width .'px';
$height = empty($height) ? '285px' : $height .'px';
// this will be executed by not Internet Explorer browsers
$output = '
' . "\n";
// this will be executed by Internet Explorer
$output .= '' . "\n";
// params will be passed to both IE or not IE browsers
$output .= '
'
. //_video_get_parameters($node) .
'
'. t('Your browser is not able to display this multimedia content.') .'
'; // only one needed becouse only one opening tag has been parsed by browsers
return $output;
}
/**
* Play Ogg Theora videos with Cortado Applet
*
* @param $node
* object with node information
*
* @return
* string of content to display
*/
function theme_video_play_ogg_theora($element) {
global $base_url;
$cortado_location = variable_get('video_cortado', $base_url . '/cortado.jar');
//$url = _video_get_fileurl($node->vidfile);
$video = file_create_url($element['#item']['filepath']);
$width = ($node->video_scaled_x ? $node->video_scaled_x : '425');
$height = ($node->video_scaled_y ? $node->video_scaled_y : '350');
$output = '
This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.
';
/*
$output = theme('video_format_play', $output,
t('http://java.com/download/'), t('Link to java.com'), t('Download Java'));*/
return $output;
}