You are here

videojs.tpl.php in Video.js (HTML5 Video Player) 6

File

theme/videojs.tpl.php
View source
<?php

/**
 * @file
 * Provide the HTML output of the Video.js video player.
 */
$attrs = '';
if (!empty($autoplay)) {
  $attrs .= ' autoplay="autoplay"';
}
if (!empty($poster)) {
  $attrs .= ' poster="' . check_plain($poster) . '"';
}
if (!empty($items)) {
  ?>
<div class="video-js-box <?php

  print variable_get('videojs_skin', 'default');
  ?>" id="<?php

  echo check_plain($player_id);
  ?>">
  <video id="<?php

  echo check_plain($player_id);
  ?>-video" class="video-js"<?php

  echo $attrs;
  ?> width="<?php

  echo $width;
  ?>" height="<?php

  echo $height;
  ?>" controls="controls" preload="auto">
<?php

  foreach ($items as $item) {
    ?>
    <source src="<?php

    echo check_plain($item['url']);
    ?>" type="<?php

    echo check_plain($item['videotype']);
    ?>" />
<?php

  }
  if (!empty($flash_player)) {
    ?>
    <div class="vjs-flash-fallback"><?php

    echo $flash_player;
    ?></div>
<?php

  }
  ?>
    <div class="vjs-no-video">
      <strong>Download video:</strong>
<?php

  foreach ($items as $item) {
    ?>
      <a href="<?php

    echo check_plain($item['url']);
    ?>"><?php

    echo drupal_strtoupper(drupal_substr($item['filemime'], 6));
    ?></a>,
<?php

  }
  ?>
    </div>
  </video>
</div>
<?php

}