You are here

function theme_video_play_quicktime in Video 6.3

Same name and namespace in other branches
  1. 5 includes/common.inc \theme_video_play_quicktime()
  2. 6 includes/common.inc \theme_video_play_quicktime()
  3. 6.2 includes/common.inc \theme_video_play_quicktime()

Play videos from in Quicktime format

Parameters

$node: object with node information

Return value

string of content to display

See also

http://developer.apple.com/internet/ieembedprep.html

1 theme call to theme_video_play_quicktime()
_video_common_get_player in includes/common.inc
Get the object for the suitable player for the parameter resource

File

includes/common.inc, line 255
Add some common functions for the various video types supported

Code

function theme_video_play_quicktime($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';

  // this will be executed by not Internet Explorer browsers
  $output = '<!--[if !IE]> <-->
            <object type="video/quicktime" width="' . $width . '" height="' . $height . '"
            data="' . $video . '">
            <!--> <![endif]-->' . "\n";

  // this will be executed by Internet Explorer
  $output .= '<!--[if IE]>
              <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
              codebase="http://www.apple.com/qtactivex/qtplugin.cab"
              width="' . $width . '" height="' . $height . '" scale="tofit" >
              <![endif]-->' . "\n";

  // params will be passed to both IE or not IE browsers

  //GMM: kioskmode enabled so users don't bypass download security video through player
  $output .= '<param name="src" value="' . $video . '" />
              <param name="AUTOPLAY" value="' . (variable_get('video_autoplay', TRUE) ? TRUE : FALSE) . '" />
              <param name="KIOSKMODE" value="true" />
              <param name="CONTROLLER" value="true" />' . "\n" . '<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
  return $output;
}