Created
September 30, 2013 15:02
-
-
Save dyaa/6765099 to your computer and use it in GitHub Desktop.
Check if jplayer is playing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#jquery_jplayer_1").jPlayer({ | |
swfPath: "http://www.jplayer.org/latest/js/Jplayer.swf", | |
ready: function () { | |
$(this).jPlayer("setMedia", { mp3: "http://77.68.106.224:8018/;stream/1" }); | |
}, | |
supplied: "mp3" | |
}); | |
setInterval(function () { | |
var isPaused = $('#jquery_jplayer_1').data().jPlayer.status.paused; | |
$("#message").text("Is Paused: " + isPaused); | |
}, 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="jquery_jplayer_1" class="jp-jplayer"></div> | |
<div id="jp_container_1" class="jp-audio"> | |
<ul class="jp-controls"> | |
<li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li> | |
<li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li> | |
<li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li> | |
</ul> | |
<div class="jp-current-time"></div> | |
<div class="jp-duration"></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> | |
<p id="message"></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment