Reputation: 55
I wanted to autoplay multiple audio files sequentially.
Below code plays all the audios at the same time.
<audio src="26de96c4000ceccafc415c5f191b5836.wav" autoplay ></audio>
<audio src="0001.wav" autoplay ></audio>
Please advice whether it can be played sequentially.
Upvotes: 1
Views: 11377
Reputation: 826
Remove the "autoplay" attribute from the "audio" tags and use javascript
The method "ended" is called when one "audio" tag finishes:
<audio ... ended="nextAudioNode.play();">
http://www.w3schools.com/tags/ref_av_dom.asp
Upvotes: 3