I have an array of audio elements with the time they need to be played representing a sound. I would like to be able to play the whole array at the correct times like a real sound.
Small precision, the table contains the data-key of the audio element, which is not a problem because I easily recover the audio element associated:
<audio data-key="65 81 80"src="static/assets/sounds/boom.wav"id="boomSound"></audio>
The record array :
It start at 0 sec.
In this example, I would like to play the 1st audio element after 0.2sec (200ms), then the 2nd 0.6sec after the beginning, …