<html>
<head>
	<meta charset="UTF-8">
	<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.3/mediaelementplayer.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.3/mediaelement-and-player.min.js"></script>
	<title>{{TITLE}}</title>
</head>
<body>
	<div class="video-player">
        <?php if (!empty($pt->get_video->vimeo)) {?>
            <iframe src="http://player.vimeo.com/video/{{VIDEO_ID}}?api=1;title=0&amp;byline=0&amp;portrait=0&amp;autoplay=1" width="100%" height="<?php echo $pt->height;?>" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
         <?php } else if (!empty($pt->get_video->daily)) { ?>
            <iframe frameborder="0" width="100%" height="<?php echo $pt->height;?>" src="//www.dailymotion.com/embed/video/{{VIDEO_ID}}?PARAMS" allowfullscreen></iframe>
         <?php } else { ?>
            <video id="my-video" controls style="width:100%; height:<?php echo $pt->height;?>" poster="{{THUMBNAIL}}" <?php echo ($pt->autoplay == 1) ? "autoplay='true'" : ""?>>
               <source src="{{VIDEO_LOCATION}}" type="{{VIDEO_TYPE}}"> Your browser does not support HTML5 video.
               <!-- //src="http://www.youtube.com/watch?v=nOEw9iiopwI" type="video/youtube" -->
            </video>
         <?php } ?>
    </div>
</body>
</html>
<style>
body {
	margin: 0;
	padding: 0;
}
video {
	width: 100%;
	height: 100%;

}
</style>
<script>
$('video, audio').mediaelementplayer({
  // Do not forget to put a final slash (/)
  pluginPath: 'https://cdnjs.com/libraries/mediaelement/',
  // this will allow the CDN to use Flash without restrictions
  // (by default, this is set as `sameDomain`)
  shimScriptAccess: 'always',

  features: ['playpause','progress','current','duration','tracks','volume'<?php echo ($pt->autoplay == 1) ? ",'fullscreen'" : ""?>],

  success: function (media) {
     var isYoutube = ~media.rendererName.indexOf('youtube');
  }
  // more configuration
});
</script>