Auto Reconnect HTML5 Radio Player

<script type="text/javascript">

function autoReconnect()
{

console.log( jQuery('#jquery_jplayer_1').data().jPlayer.status.paused );  //// jquery_jplayer_1  jPlayer element

if(jQuery('#jquery_jplayer_1').data().jPlayer.status.paused )  //&& butclick==false
{

jQuery("#current-track").html("FM Radio Station RadioForge.com.");
jQuery(".jp-play").click();
//jQuery(this).jPlayer("setMedia", stream).jPlayer("play");

}

}


setInterval(function(){autoReconnect();}, 25000);  // every 25 secs

</script>

Posted in: JavaScript