-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
34 lines (34 loc) · 1.02 KB
/
demo.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
<html>
<head>
<title>Media Element Syncer</title>
<script type="text/javascript" src="./media-element-syncer.js"></script>
</head>
<body>
<div>
<h1>Media Element Syncer: Demo</h1>
<p>
GitHub:
<a
href="https://github.com/tjenkinson/media-element-syncer"
target="_blank"
>https://github.com/tjenkinson/media-element-syncer</a
>
</p>
<div>
<video id="video1" src="./assets/test.mp4" controls></video>
<video id="video2" src="./assets/test.mp4" muted></video>
</div>
<div>
<p>1 second behind</p>
<video id="video3" src="./assets/test.mp4" muted></video>
</div>
<script type="text/javascript">
const syncer = new MediaElementSyncer.MediaElementSyncer(
document.getElementById('video1')
);
syncer.addChild(document.getElementById('video2'));
syncer.addChild(document.getElementById('video3'), { offset: -1000 });
</script>
</div>
</body>
</html>