-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
74 lines (59 loc) · 1.76 KB
/
index.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>html5 playlist demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: "Lucida Console", monospace;
background-color: plum;
}
.container {
width: 30em;
margin: auto;
padding: 1em;
background-color: #FFCC66;
}
audio {
width: 98%;
}
li {
list-style: none;
}
li a {
text-decoration: none;
color: black;
}
.current-track {
background-color: black;
color: #FFCC66;;
}
</style>
</head>
<body>
<div class="container">
<h1>html5 playlist demo</h1>
<p>just some my tracks:</p>
<audio src="02-anke.mp3" controls data-playlist-id="playlist"></audio>
<ul id="playlist">
<li><a href="02-anke.mp3">Anke</a></li>
<li><a href="09-metalik.mp3">Metalik</a></li>
<li><a href="14-regenschori.mp3">Regenschori</a></li>
</ul>
<p>one <code>audio</code> without playlist:</p>
<audio src="09-metalik.mp3" controls></audio>
<p>another <code>audio</code> instance, this one pretending to be meme playlist:</p>
<audio src="14-regenschori.mp3" controls data-playlist-id="meme_playlist"></audio>
<ul id="meme_playlist">
<li><a href="14-regenschori.mp3">loituma.swf</a></li>
<li><a href="02-anke.mp3">Sandstorm by Darude</a></li>
<li><a href="09-metalik.mp3">trololo.mp3</a></li>
</ul>
<!-- Note: songs are shuffled as Chrome would not play different audio elements with same src. -->
<p>(demo of <a href="https://github.com/severak/html5-playlist">severak/html5-playlist</a>)</p>
<p>(also try <a href="alternative.html">alternative approach</a>)</p>
</div>
<script src="html5-playlist.js"></script>
</body>
</html>