Answer the question
In order to leave comments, you need to log in
Sequential audio playback in html5?
There is such a code
<div class="audio">
<audio id="player">
<source src="audio/Beliver.mp3">
<source src="audio/Radioactive.mp3">
<source src="audio/Polaroid.mp3">
</audio>
<div class="controls">
<img src='media/plauer/play.png' onclick="document.getElementById('player').play()">
<img src='media/plauer/pause.png' onclick="document.getElementById('player').pause()">
<div class="nameAudio">Beliver.mp3</div>
<img src='media/plauer/volume+.png' onclick="document.getElementById('player').volume+=0.1">
<img src='media/plauer/volume-.png' onclick="document.getElementById('player').volume-=0.1">
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Multiple src's can be assigned to the same audio tag, giving the browser an alternative for choosing a format (eg mp3 or ogg for the same track). But not for sequential playback.
If you need to change the track at the end, then you need to do it according to JS events.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question