You are here

function theme_node_kaltura_entry_entryId in Kaltura 5

Same name and namespace in other branches
  1. 6.2 plugins/node_kaltura_entry/node_kaltura_entry.module \theme_node_kaltura_entry_entryId()
  2. 6 plugins/node_kaltura_entry/node_kaltura_entry.module \theme_node_kaltura_entry_entryId()
3 theme calls to theme_node_kaltura_entry_entryId()
kaltura_get_default_display in plugins/field_kaltura/field_kaltura.module
node_kaltura_entry_form in plugins/node_kaltura_entry/node_kaltura_entry.module
Implementation of hook_form().
node_kaltura_entry_view in plugins/node_kaltura_entry/node_kaltura_entry.module
Implementation of hook_view().

File

plugins/node_kaltura_entry/node_kaltura_entry.module, line 569

Code

function theme_node_kaltura_entry_entryId($node, $teaser) {
  if ($teaser && variable_get('kaltura_display_entry_video_teaser_with_player', 0) == 0) {
    return '';
  }
  if ($node->kaltura_media_type == 2) {
    $width = variable_get('kaltura_image_entry_width', '410');
    $height = variable_get('kaltura_image_entry_height', '364');
    return '<img src="' . $node->kaltura_thumbnail_url . '/width/' . $width . '/height/' . $height . '/type/1/quality/100" />';
  }
  if ($node->kaltura_media_type == 5) {
    $media_type = 'audio';
    $width = variable_get('kaltura_audio_entry_width', '410');
    $height = variable_get('kaltura_audio_entry_height', '364');
    return '[kaltura-widget media_type="' . $media_type . '" entry="' . $node->kaltura_entryId . '" size="large" width="' . $width . '" height="' . $height . '" /]';
  }
  $width = variable_get('kaltura_video_entry_width', '410');
  $height = variable_get('kaltura_video_entry_height', '364');
  if ($node->kstatus == 0 && variable_get('display_entry_not_ready', 0) != 0) {
    if (variable_get('entry_not_ready_text', '') != '') {
      return variable_get('entry_not_ready_text', '');
    }
    return t('This Kaltura Item is still rendering.');
  }
  $media_type = 'video';
  return '[kaltura-widget media_type="' . $media_type . '" entry="' . $node->kaltura_entryId . '" size="large" width="' . $width . '" height="' . $height . '" /]';
}