You are here

function theme_video_play_ogg_theora in Video 6

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

Play Ogg Theora videos with Cortado Applet

Parameters

$node: object with node information

Return value

string of content to display

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

File

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

Code

function theme_video_play_ogg_theora($node) {
  global $base_url;
  $cortado_location = variable_get('video_cortado', $base_url . '/cortado.jar');
  $url = _video_get_fileurl($node->vidfile);
  $width = $node->video_scaled_x ? $node->video_scaled_x : '425';
  $height = $node->video_scaled_y ? $node->video_scaled_y : '350';
  $output = '
  <!--[if !IE]>-->
  <object classid="java:com.fluendo.player.Cortado.class"
          type="application/x-java-applet"
          archive="' . $cortado_location . '"
          width="' . $width . '" height="' . $height . '" >
  <!--<![endif]-->
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
              codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab"
              width="' . $width . '" height="' . $height . '" >
        <param name="code" value="com.fluendo.player.Cortado" />
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
      <!-- IE and Konqueror browser need the archive param -->
      <param name="archive" value="' . $cortado_location . '" />
      <param name="url" value="' . $url . '"/>
      <param name="local" value="false" />
      <param name="keepaspect" value="true" />
      <param name="video" value="true" />
      <param name="audio" value="true" />
      <param name="seekable" value="true" />
      <param name="duration" value="' . $node->playtime_seconds . '" />
      <param name="bufferSize" value="200" />
      <strong>
          This browser does not have a Java Plug-in.<br />
          <a href="http://java.com/download/">
            Get the latest Java Plug-in here.
          </a>
      </strong>
  </object>
  ';
  $output = theme('video_format_play', $output, t('http://java.com/download/'), t('Link to java.com'), t('Download Java'));
  return $output;
}