Forum Discussion
Jürgen_Schoene_
Community Member
the order of the audios in the dom tree is not fixed
it can be different at every start
test with firefox, first start
second start
=> different order
so your methode to find the correct audio cannot work
idea: identify the filenames of the audio
var filename1 = audioElement1.src.split("/").slice(-1)
var filename2 = audioElement2.src.split("/").slice(-1)
var filename3 = audioElement3.src.split("/").slice(-1)
var filename4 = audioElement4.src.split("/").slice(-1)
so you can use the filenames to find the correct audio
DanLidholm-48cd
6 months agoCommunity Member
Hi Jürgen, thank you for your answer. That made it clear. However, I didn't know that it could be change after it was published.
Great suggestion to use the file name. Could not get ID to work but hopefully your suggestion will do the trick.
I'll be back.