forked from likev/html5-audio-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
67 lines (61 loc) · 2.08 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
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>BetterAudio player HTML5</title>
<!-- include audio player -->
<!--<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">-->
<link rel="stylesheet" href="css/googleMaterialIcons.css">
<link rel="stylesheet" href="css/BetterAudio.css">
<script src="js/BetterAudio.js"></script>
<style>
#player {
position: relative;
/*width: 700px;*/
max-width: 100%;
/*height: 500px;*/
border: solid 1px gray;
}
#player2 {
position: relative;
border: solid 1px gray;
width: 256px;
/*height: 256px;*/
max-width: 100%;
}
</style>
</head>
<body>
<!-- Audio player container-->
<div id='player'></div>
<br>
<div id='player2'></div>
<p>Music found on: <a href="http://www.openmusicarchive.org" target=_blank>http://www.openmusicarchive.org</a></p>
<script>
//test image for player and notifications
var iconImage = null;
var iconImage2 = "http://www.openmusicarchive.org/images/OMA_logo.png";
var p1 = BetterAudio.newPlayer({
container: '#player', //a string containing one CSS selector
volume : 0.7,
autoPlay : true,
notification: false,
playList: [
{icon: iconImage, title: "Jump Steady Blues", file: "http://www.openmusicarchive.org/audio/Jump_Steady_Blues.mp3"},
{icon: iconImage, title: "Eddies Twister", file: "http://www.openmusicarchive.org/audio/Eddies_Twister.mp3"}
]
});
var p2 = BetterAudio.newPlayer({
container: '#player2', //a string containing one CSS selector
volume : 0.66,
autoPlay : false,
notification: true,
playList: [
{icon: iconImage2, title: "Jump Steady Blues", file: "http://www.openmusicarchive.org/audio/Jump_Steady_Blues.mp3"},
{icon: null, title: "Broken Link", file: "broken.link.local"}
]
});
</script>
</body>
</html>