Using Java Script and multiple audio files playing simultaneously, wrong audio file unmuted when reloading page
Hi,
I made a drag & drop production about reverberation where 4 almost identical audio files are playing at the same time. They are synchronized and loops, they never stops except when the paus button is used.
All files except one are muted, using trigger to decide what audio should be unmuted or not.
The big problem
The problem is that the correct audio file is not always unmuted and the problem is a little bit random.
Everything works fine the firs time it's loaded in the web browser but when it is reloaded the wrong audio file can be unmuted. But a few times, now and then, it can mix up the audio files the first time.
The JS should pick up the audio files in the order they are published and it should not be possible for the code to change after publishing.
I also tried to use the audio ID to point to the correct audio files but I did not get it to work. (var audioElement1 = document.getElementById("29"); etc.)
To spare you the audio introduction, a trigger is temporary added to jump to the drag & drop-part. A small part of the audio may be heard before the jump.
Red labels about the audio added to the drop zones.
Also, variables values on the top. Not sure if it is possible to show the name on audio file.
Example: https://360.articulate.com/review/content/15e51691-2bf8-416d-bbca-5bcb29a81e47/review
I know there are some gurus here that probably can see what's wrong. I hope you can help me.