You are here

function theme_video_html5 in Video 7

Same name and namespace in other branches
  1. 6.5 video_formatter.inc \theme_video_html5()
  2. 6.4 video_formatter.inc \theme_video_html5()
  3. 7.2 video.theme.inc \theme_video_html5()

Theme wrapper for HTML5

1 theme call to theme_video_html5()
theme_video in ./video.theme.inc

File

./video.theme.inc, line 226

Code

function theme_video_html5($variables) {
  $themed_output = NULL;
  $video = $variables['video'];
  $video->html5_player = variable_get('video_extension_' . $video->player . '_html5_player', '');
  switch ($video->html5_player) {
    case 'video':
      return theme('video_play_html5', array(
        'video' => $video,
        'themed_output' => $themed_output,
      ));
      break;
    case 'videojs':
      $items = _video_object_to_array($video->files);
      $items += array(
        'thumbnail' => (array) $video->thumbnail,
      );
      $attributes = array();
      $attributes['width'] = $video->player_width;
      $attributes['height'] = $video->player_height;
      return theme('videojs', array(
        'items' => $items,
        'player_id' => 'video-' . $video->fid,
        'attributes' => $attributes,
      ));
      break;
  }
}