-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo-append-track.html
39 lines (31 loc) · 1.23 KB
/
demo-append-track.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
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html">
<title>Audio Element Js</title>
<meta name="author" content="Razzbee">
<link rel="stylesheet" type="text/css" media="all" href="css/audioElementPlayer.css">
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/mediaelement-and-player.min.js"></script>
<script type="text/javascript" src="js/audioElementPlayer.js"></script>
</head>
<body>
<h1>Audio Element JS demo</h1>
<audio id="audio-player" src="#" type="audio/mp3" controls="controls"></audio>
<script type="text/javascript">
$(function(){
audioPlayer = new audioElementPlayer("#audio-player",{
audioVolume: 'horizontal',
audioWidth: '100%',
audioHeight: 76,
debug : true,
playlistItems : [{itemName:"Banky",temUrl : "banky.mp3"},{itemName:"Johny",itemUrl : "johny.mp3"}]
});
//lets now append an audio file to the end
//this supports two parameters, the track Object and a boolean to tell whether to play the file or not after appending it,Default is false
audioPlayer.appendItem({itemName : "Banky", itemUrl:"topRanking.mp3"},true);
});
</script>
</body>
</html>