You are here

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

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)) {
  ?>
<video id="<?php

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

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

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

  echo $height;
  ?>" controls="controls" preload="auto" data-setup='{
  "width": <?php

  echo $width;
  ?>,
  "height": <?php

  echo $height;
  ?>
}'>
<?php

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

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

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

  }
  ?>
  <p>
    <strong>Download video:</strong><br />
<?php

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

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

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

  }
  ?>
  </p>
</video>
<?php

}