How could we make some audio in html5 play after another one has finished?
I have tried with jquery delay() function but it wont work at all, is it possible using pause() in html5 audio with timer instead ? For example, pause('500',function(){});?
Here’s a JSLinted, unobtrusive Javascript example demonstrating how to handle and use the
endedmediaevent. In your particular situation, you would trigger playback of the second audio file in yourendedevent handler.You can use the code below or run the test fiddle.
Click an item in the playlist to begin playback. After one audio ends, the next will begin.
markup: (note the deliberate avoidance of whitespace between
<li>elements – this is to simplify traversing the DOM withnextSibling.)script: