<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(){
+ setTimeout(function () {radioTitle();}, 2000);
+ setInterval(function () {radioTitle();}, 10000);
+
var stream = {
title: "Proxy Radio",
mp3: "http://radio.wpitchoune.net:8080/mp3"
$(this).jPlayer("setMedia", stream).jPlayer("play");
}
},
- swfPath: "../dist/jplayer",
+ swfPath: "js",
supplied: "mp3",
preload: "none",
wmode: "window",
<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>
- <!--<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>