77 lines
2.3 KiB
HTML
77 lines
2.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Plyr - A simple HTML5 media player</title>
|
|
<meta name="description" content="Custom HTML5 video controls and WebVTT captions.">
|
|
<meta name="author" content="Sam Potts">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- Styles -->
|
|
<link rel="stylesheet" href="dist/css/plyr.css">
|
|
<link rel="stylesheet" href="dist/css/docs.css">
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>Plyr</h1>
|
|
<p>A simple HTML5 media player</p>
|
|
</header>
|
|
|
|
<section class="example-video">
|
|
<div class="player">
|
|
<video poster="//cdn.sampotts.me/plyr/poster.jpg" controls crossorigin>
|
|
<!-- Video files -->
|
|
<source src="//cdn.sampotts.me/plyr/movie.mp4" type="video/mp4">
|
|
<source src="//cdn.sampotts.me/plyr/movie.webm" type="video/webm">
|
|
|
|
<!-- Text track file -->
|
|
<track kind="captions" label="English captions" src="//cdn.sampotts.me/plyr/movie_captions_en.vtt" srclang="en" default>
|
|
|
|
<!-- Fallback for browsers that don't support the <video> element -->
|
|
<div>
|
|
<a href="//cdn.sampotts.me/plyr/movie.mp4">
|
|
<img src="//cdn.sampotts.me/plyr/poster.jpg" alt="Download">
|
|
</a>
|
|
</div>
|
|
</video>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="example-audio">
|
|
<div class="player">
|
|
<audio controls>
|
|
<!-- Audio files -->
|
|
<source src="//cdn.sampotts.me/plyr/logistics-96-sample.mp3" type="audio/mp3">
|
|
|
|
<!-- Fallback for browsers that don't support the <audio> element -->
|
|
<div>
|
|
<a href="//cdn.sampotts.me/plyr/logistics-96-sample.mp3">Download</a>
|
|
</div>
|
|
</audio>
|
|
</div>
|
|
<small>"96" by Logistics. More can be purchased from <a href="https://www.hospitalrecords.com/shop/artist/logistics" target="_blank">Hospital Records</a>.</small>
|
|
</section>
|
|
|
|
<!-- Load SVG defs -->
|
|
<script>
|
|
(function(d,p){
|
|
var a=new XMLHttpRequest(),
|
|
b=d.body;
|
|
a.open("GET",p,!0);
|
|
a.send();
|
|
a.onload=function(){
|
|
var c=d.createElement("div");
|
|
c.style.display="none";
|
|
c.innerHTML=a.responseText;
|
|
b.insertBefore(c,b.childNodes[0])
|
|
}
|
|
})(document,"dist/svg/sprite.svg");
|
|
</script>
|
|
|
|
<!-- Core player -->
|
|
<script src="dist/js/plyr.js"></script>
|
|
|
|
<!-- Docs setup -->
|
|
<script src="dist/js/docs.js"></script>
|
|
</body>
|
|
</html> |