-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvideoAudio.html
More file actions
49 lines (48 loc) · 1.58 KB
/
videoAudio.html
File metadata and controls
49 lines (48 loc) · 1.58 KB
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
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Video</title>
<style type="text/css">
body {
background-color: black;
}
.grayscale {
-webkit-filter: grayscale(1);
filter: grayscale(1);
}
video, audio {
display: block;
margin: 50px auto 150px auto;
}
h1, h2 {
color: white;
width: 600px;
margin: 0 auto;
}
</style>
</head>
<body>
<h1>HTML5 Video</h1>
<video class="grayscale" width="600" controls="controls" preload="metadata" autoplay poster="images/jazzcat.png">
<source src="video/WebM_Bunny.webm#t=45,55" type="video/webm" />
<source src="video/OGV_Bunny.ogv#t=45,55" type="video/ogg" />
<source src="video/MP4_Bunny.mp4#t=45,55" type="video/mp4" />
<track src="video/sub.vtt" label="English subtitles" kind="subtitles" srclang="en" default>
</video>
<!-- edge doesn't support fragments -->
<h2>Same Video No Fragments</h2>
<video width ="600" controls="controls" preload="auto" loop poster="images/jazzcat.png">
<!-- If the browser can't play WEBM try OGV then MP4 -->
<source src="video/WebM_Bunny.webm" type="video/webm"/>
<source src="video/OGV_Bunny.ogv" type="video/ogg" />
<source src="video/MP4_Bunny.mp4" type="video/mp4"/>
<track src="video/sub.vtt" label="English subtitles" kind="subtitles" srclang="en" default>
</video>
<!-- Chrome doesn't support subtitles -->
<h2>HTML5 Audio</h2>
<audio preload="auto" loop controls="controls">
<source src="audio/tail.mp3" type="audio/mpeg; codecs=mp3" />
<source src="audio/beats.ogg" type="audio/ogg; codecs=vorbis" />
</audio>
</body>
</html>