projects
/
radio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3fac49d
)
added current track
author
Jean Philip Orsini
<orsinije@fr.ibm.com>
Tue, 19 Jan 2016 12:07:05 +0000
(13:07 +0100)
committer
Jean Philip Orsini
<orsinije@fr.ibm.com>
Tue, 19 Jan 2016 12:07:05 +0000
(13:07 +0100)
html/index.html
patch
|
blob
|
history
diff --git
a/html/index.html
b/html/index.html
index
8f7a641
..
6354cde
100644
(file)
--- a/
html/index.html
+++ b/
html/index.html
@@
-16,7
+16,28
@@
<script>
<script>
+ function radioTitle() {
+ console.log("radioTitle");
+ var url = 'http://radio.wpitchoune.net:8080/current.xsl';
+ var mountpoint = '/mp3';
+
+ $.ajax({ type: 'GET',
+ url: url,
+ async: true,
+ jsonpCallback: 'parseMusic',
+ contentType: "application/json",
+ dataType: 'jsonp',
+ success: function (json) {
+ $('#track-title').text(json[mountpoint].title);
+ }, error: function (e) { console.log(e.message);
+ }
+ });
+ }
+
$(document).ready(function(){
$(document).ready(function(){
+ setTimeout(function () {radioTitle();}, 2000);
+ setInterval(function () {radioTitle();}, 10000);
+
var stream = {
title: "Proxy Radio",
mp3: "http://radio.wpitchoune.net:8080/mp3"
var stream = {
title: "Proxy Radio",
mp3: "http://radio.wpitchoune.net:8080/mp3"
@@
-37,7
+58,7
@@
$(document).ready(function(){
$(this).jPlayer("setMedia", stream).jPlayer("play");
}
},
$(this).jPlayer("setMedia", stream).jPlayer("play");
}
},
- swfPath: "
../dist/jplayer
",
+ swfPath: "
js
",
supplied: "mp3",
preload: "none",
wmode: "window",
supplied: "mp3",
preload: "none",
wmode: "window",
@@
-82,7
+103,7
@@
$(document).ready(function(){
<div class="jp-play-bar"></div>
</div>
</div>
<div class="jp-play-bar"></div>
</div>
</div>
- <div class="jp-current-time" role="timer" aria-label="time"> </div>
+ <div class="jp-current-time" role="timer" aria-label="time"> </div>
</div>
</div>
<div class="jp-details">
</div>
</div>
<div class="jp-details">
@@
-94,9
+115,8
@@
$(document).ready(function(){
</div>
</div>
</div>
</div>
</div>
</div>
- <!--<audio controls>
- <source src="http://radio.wpitchoune.net:8080/mp3">
- </audio>-->
+
+ <p>Current track: <span id="track-title">LIVE</span>.</p>
<p>If the above player does not work you can play directly the
<a href="http://radio.wpitchoune.net:8080/mp3">stream</a>.</p>
<p>If the above player does not work you can play directly the
<a href="http://radio.wpitchoune.net:8080/mp3">stream</a>.</p>