Using HTML 5, I want to play multiple sounds simultaneously. how can I do it?
Here’s what I currently have:
<audio controls="controls">
<source src="audio/(TESBIHAT).mp3" type="audio/mpeg" />
<source src="audio/Dombra.mp3" type="audio/mpeg" />
<embed height="50px" width="100px" src="audio/(TESBIHAT).mp3" />
<embed height="50px" width="100px" src="audio/Dombra.mp3" />
</audio>
With JavaScript and the HTML5 Audio API you could do something like this:
I have tested this in Chrome v. 20, and it seems to work 🙂
The
<source>tag is used to specify different formats of the same file – such that the browser can choose another format as fallback in case the first one is not supported. That is why your own suggested solution does not work.