Skip to content

Instantly share code, notes, and snippets.

Created September 30, 2013 15:02
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Check if jplayer is playing
swfPath: "",
ready: function () {
$(this).jPlayer("setMedia", { mp3: ";stream/1" });
supplied: "mp3"
setInterval(function () {
var isPaused = $('#jquery_jplayer_1').data().jPlayer.status.paused;
$("#message").text("Is Paused: " + isPaused);
}, 1000);
<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>
<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=""
target="_blank">Flash plugin</a>.
<p id="message"></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment