Powered by Blogger.

Trigger an Event if Audio has Finished Playing


Here is showing two different methods to trigger an event if the current audio has finished playing. Try it out to get it working.
1) Use HTML 5 onended event handler
<audio src="sample.mp3" onended="yourFunction()"></audio>
2) For jQuery bind ended event handler
 $(audio).bind("ended", function(){ ... });

No comments