-
Notifications
You must be signed in to change notification settings - Fork 1
/
audioStreaming.html
46 lines (46 loc) · 1.73 KB
/
audioStreaming.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Audio Streaming</title>
<link rel="stylesheet" href="css/BlackBerry-JQM-all.min.css" />
<script src="js/BlackBerry-JQM-all.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header" data-position="fixed">
<h1>Audio Streaming</h1>
</div>
<div data-role="content">
<div data-role="collapsible" data-collapsed="false">
<h3>Streaming Audio</h3>
<script>
var audio = document.createElement('audio');
audio.src = 'http://media.xiph.org/BBB/BigBuckBunny-stereo.flac';
audio.load();
$('#play').click(function(){ audio.play(); });
$('#pause').click(function(){ audio.pause(); });
$('#volume').change(function(){ audio.volume = $(this).val() / 100.0; });
</script>
<div data-role="controlgroup" data-type="horizontal">
<a href="" id="play" data-role="button">Play</a>
<a href="" id="pause" data-role="button">Pause</a>
</div>
<label for="volume">Volume:</label>
<input type="range" name="volume" id="volume" value="100" min="0" max="100" />
</div>
<div data-role="collapsible" data-collapsed="false">
<h3>Streaming Playlist (Does not work)</h3>
<audio controls="controls" src="http://ccmixter.org/api/query/stream.m3u?f=m3u&ids=38236">
</audio>
</div>
</div>
<!--/content-->
<div data-role="footer" data-position="fixed">
<div id="action-bar-area" data-role="actionbar">
<div data-role="back"></div>
</div>
</div>
</div>
</body>
</html>