The Little Guy Posted March 13, 2012 Share Posted March 13, 2012 I am trying to build an Html 5 / JavaScript audio player, and I can not figure out why when I press play it starts playing, then press stop and it stops, but when I press play again it plays for a few seconds then stops. Why? Here is my click event: $(".playPause").click(function(){ if(audio.paused){ audio.play(); $(this).css({ backgroundPosition: "-30px -30px" }); }else{ audio.pause(); $(this).css({ backgroundPosition: "-30px 0" }); } return false; }); Here is the example: http://hostbox.us/apiTest.php Quote Link to comment https://forums.phpfreaks.com/topic/258798-audio-starts-playing-then-stops/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.