-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathautoplay-test.html
40 lines (38 loc) · 1.18 KB
/
autoplay-test.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
<!DOCTYPE html>
<html>
<head>
<title>Media Muted Autoplay Test Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
window.onload = function() {
var videoElem = document.getElementById('html5-video');
videoElem.play().then(setTimeout(function() { videoElem.muted = false; }, 10000));
};
</script>
</head>
<body>
<section>
<h2>HTML5 Video</h2>
<video id="html5-video" controls width='300' height='200' muted
poster="BigBuck_360x240.jpg">
<source src="BigBuck.m4v">
<source src="BigBuck.webm" type="video/webm">
<source src="BigBuck.theora.ogv" type="video/ogg">
</video>
</section>
<section>
<h2>HTML5 Audio</h2>
<audio id=tetris controls muted autoplay>
<source src="tetris.mp3" type='audio/mp3'>
<source src="tetris.ogg" type='audio/ogg; codecs=vorbis'>
</audio>
</section>
<section>
<h2>Silent video</h2>
<video id="html5-video-silent" controls autoplay width='300' height='200'>
<source src="EsteemedDescriptiveAttwatersprairiechicken.mp4">
<source src="EsteemedDescriptiveAttwatersprairiechicken.webm">
</video>
</section>
</body>
</html>