src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js">
</script>
+ <link type="text/css" href="skin/blue.monday/css/jplayer.blue.monday.min.css" rel="stylesheet" />
+ <script type="text/javascript" src="js/jquery.jplayer.min.js"></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(){
+ setTimeout(function () {radioTitle();}, 2000);
+ setInterval(function () {radioTitle();}, 10000);
+
+ var stream = {
+ title: "Proxy Radio",
+ mp3: "http://radio.wpitchoune.net:8080/mp3"
+ },
+ ready = false;
+
+ $("#jquery_jplayer_1").jPlayer({
+ ready: function (event) {
+ ready = true;
+ $(this).jPlayer("setMedia", stream);
+ },
+ pause: function() {
+ $(this).jPlayer("clearMedia");
+ },
+ error: function(event) {
+ if(ready && event.jPlayer.error.type === $.jPlayer.error.URL_NOT_SET) {
+ // Setup the media stream again and play it.
+ $(this).jPlayer("setMedia", stream).jPlayer("play");
+ }
+ },
+ swfPath: "js",
+ supplied: "mp3",
+ preload: "none",
+ wmode: "window",
+ useStateClassSkin: true,
+ autoBlur: false,
+ keyEnabled: true
+ });
+});
+ </script>
+
<title>Proxy Radio</title>
</head>
<body>
- <header>
- <h1>Proxy Radio</h1>
- </header>
-
<nav>
<ul>
- <li>Home</li>
+ <li class="selected">Proxy Radio</li>
<li><a href="last_songs.html">Played songs</a></li>
<li><a href="songs.html">All songs</a></li>
</ul>
</nav>
<section>
- <audio controls>
- <source src="http://radio.wpitchoune.net:8080/mp3">
- </audio>
+<div id="jquery_jplayer_1" class="jp-jplayer"></div>
+<div id="jp_container_1" class="jp-audio" role="application" aria-label="media player">
+ <div class="jp-type-single">
+ <div class="jp-gui jp-interface">
+ <div class="jp-volume-controls">
+ <button class="jp-mute" role="button" tabindex="0">mute</button>
+ <button class="jp-volume-max" role="button" tabindex="0">max volume</button>
+ <div class="jp-volume-bar">
+ <div class="jp-volume-bar-value"></div>
+ </div>
+ </div>
+ <div class="jp-controls-holder">
+ <div class="jp-controls">
+ <button class="jp-play" role="button" tabindex="0">play</button>
+ <button class="jp-stop" role="button" tabindex="0">stop</button>
+ </div>
+ <div class="jp-progress">
+ <div class="jp-seek-bar">
+ <div class="jp-play-bar"></div>
+ </div>
+ </div>
+ <div class="jp-current-time" role="timer" aria-label="time"> </div>
+ </div>
+ </div>
+ <div class="jp-details">
+ <div class="jp-title" aria-label="title"> </div>
+ </div>
+ <div class="jp-no-solution">
+ <span>Update Required</span>
+ To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
+ </div>
+ </div>
+</div>
+
+ <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>