Answer the question
In order to leave comments, you need to log in
How to consistently play sounds on the site?
there is a layout like this:
<audio reload="auto" controls>
<source src="audio/1.mp3" >
</audio>
<audio reload="auto" controls>
<source src="audio/2.mp3" >
</audio>
<audio reload="auto" controls>
<source src="audio/3.mp3" >
</audio>
<audio reload="auto" controls>
<source src="audio/4.mp3" >
</audio>
Answer the question
In order to leave comments, you need to log in
We do it in JS, something like this:
var sound = new Audio();
sound.src = "sound_1.mp3";
sound.load();
sound.addEventListener("ended", callback, false);
sound.play();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question