You are here

function theme_video_play_realmedia in Video 6

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

Play videos from in Realmedia format

Parameters

$node: object with node information

Return value

string of content to display

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

File

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

Code

function theme_video_play_realmedia($node) {

  // Real's embeded player includes the controls
  // in the height
  $node->video_scaled_y += 40;
  $url = _video_get_fileurl($node->vidfile);

  // this will be executed by not Internet Explorer browsers
  $output = '<!--[if !IE]> <-->
<object type="audio/x-pn-realaudio-plugin" 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="audio/x-pn-realaudio-plugin" width="' . $node->video_scaled_x . '" height="' . $node->video_scaled_y . '"
classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" >
<![endif]-->' . "\n";

  // params will be passed to both IE or not IE browsers
  $output .= '<param name="src" value="' . $url . '" />
              <param name="_ExtentX" value="7276" />
              <param name="" value="3307" />
              <param name="AUTOSTART" value="true" />
              <param name="SHUFFLE" value="0" />
              <param name="PREFETCH" value="0" />
              <param name="NOLABELS" value="0" />
              <param name="CONTROLS" value="All" />
              <param name="CONSOLE" value="Clip1" />
              <param name="LOOP" value="0" />
              <param name="NUMLOOP" value="0" />
              <param name="CENTER" value="0" />
              <param name="MAINTAINASPECT" value="1" />
              <param name="BACKGROUNDCOLOR" value="#000000" />' . _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 = theme('video_format_play', $output, t('http://www.real.com/'), t('Link to Real'), t('Download latest Realmedia Player'));
  return $output;
}