View Single Post
Old 11-15-2012, 08:32 AM   PM User | #6
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
devnull69 will become famous soon enough
The specification says that there is the "ended" event for <audio> elements that should do exactly what you were looking for.

But: Last time I checked (about one year ago) it wasn't implemented in all browsers. Maybe it's different now, try it
Code:
$('#audio-1').on('ended', function() {
   $('#audio-2')[0].play();
});
devnull69 is offline   Reply With Quote