I'm trying to make a table of 180 tunes, each tune has an audio element. Once I play the tune and hit the play button again to pause it I want the currentTime to go back to zero.
This isn't working:
const myAudio = document.getElementsByClassName ("myAudio");
for (let i=0; i<myAudio.length; i++)
myAudio[i].addEventListener("pause", (event) => {
myAudio.currentTime = 0;
}