aboutsummaryrefslogtreecommitdiffstats
path: root/index.html
blob: 5593c3920eef768ab496c15346be6353be682efa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Plyr - A simple HTML5 media player</title>
		<meta name="description" content="A simple HTML5 media player with custom 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 with custom controls and WebVTT captions.</p>
			<a href="https://github.com/selz/plyr" target="_blank" class="btn">Download on Github</a>
		</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" srclang="en" src="assets/movie_en_captions.vtt" default>
					
					<!-- Fallback for browsers that don't support the <video> element -->
					<div>
						<a href="//cdn.sampotts.me/plyr/movie.mp4">Download</a>
					</div>
				</video>
			</div>
			<small>Big Buck Bunny. More info can be found at <a href="https://peach.blender.org" target="_blank">peach.blender.org</a>.</small>
		</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">
					<source src="//cdn.sampotts.me/plyr/logistics-96-sample.ogg" type="application/ogg">
					
					<!-- 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, which 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>

		<!-- GA -->
		<script>
		(function(i,s,o,g,r,a,m){i.GoogleAnalyticsObject=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
		ga('create', 'UA-40881672-11', 'auto');
		ga('send', 'pageview');
		</script>
	</body>
</html>