-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathembed-template.html
54 lines (43 loc) · 1.38 KB
/
embed-template.html
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
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Facebook Video</title>
<link rel="stylesheet" href="https://cdn.plyr.io/3.5.10/plyr.css" />
<style type="text/css">
body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
.video {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
</head>
<body>
<div class="video">
<video class="js-player" playsinline controls>
<source src="${mp4_video_source}" type="video/mp4" />
<!-- <source src="/path/to/video.webm" type="video/webm" /> -->
<!-- Captions are optional -->
<!-- <track kind="captions" label="English captions" src="/path/to/captions.vtt" srclang="en" default /> -->
</video>
</div>
<!-- https://github.com/sampotts/plyr -->
<script src="https://cdn.plyr.io/3.5.10/plyr.js"></script>
<script>
const players = Array.from(document.querySelectorAll('.js-player')).map(p => new Plyr(p));
console.log('players', players);
</script>
</body>
</html>