I want to have three different audio clips on a page for comparison. I would like it so that if the user presses the button to play audio clip 2 while audio clip 1 is playing, audio clip one pauses or stops so that there is only one audio clip playing at a time. Is this possible?
PS: I should have API access in a day or two if that allows for this feature!
Page 1 / 1
Put this code in the JS onReady function:
jQuery("audio").bind("play",function (){
jQuery("audio").not(this).each(function (index, audio) {
audio.pause();
});
});
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.