You are here

function theme_emvideo_video_video in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 6 contrib/emvideo/emvideo.theme.inc \theme_emvideo_video_video()
  2. 6.2 contrib/emvideo/emvideo.theme.inc \theme_emvideo_video_video()
2 theme calls to theme_emvideo_video_video()
emvideo_modal in contrib/emvideo/emvideo.module
Page callback for emvideo/thickbox/shadowbox. This will display our video in a modal window defined by the corresponding modal module. As it's a direct callback, it displays no HTML other than the video.
theme_emvideo_default in contrib/emvideo/emvideo.theme.inc

File

contrib/emvideo/emvideo.theme.inc, line 170
This defines the various theme functions for Embedded Video Field (emvideo).

Code

function theme_emvideo_video_video($field, $item, $formatter, $node, $options = array()) {
  $output = '';
  if (isset($item['value']) && isset($item['provider'])) {
    $embed = $item['value'];
    $width = isset($options['width']) ? $options['width'] : ($field['widget']['video_width'] ? $field['widget']['video_width'] : variable_get('emvideo_default_video_width', EMVIDEO_DEFAULT_VIDEO_WIDTH));
    $height = isset($options['height']) ? $options['height'] : ($field['widget']['video_height'] ? $field['widget']['video_height'] : variable_get('emvideo_default_video_height', EMVIDEO_DEFAULT_VIDEO_HEIGHT));
    $autoplay = isset($options['autoplay']) ? $options['autoplay'] : $field['widget']['video_autoplay'];
    $options['node'] = $node;
    $output = emfield_include_invoke('emvideo', $item['provider'], 'video', $embed, $width, $height, $field, $item, $node, $autoplay, $options);
    $output = '<div class="emvideo emvideo-video emvideo-' . check_plain($item['provider']) . '">' . $output . '</div>';
  }
  return $output;
}