If I wanted to pause audio but wasn’t sure which audio file was playing at any given time, usually I’d use getElementsByTagName to loop through all audio elements to pause any that are playing and reset their currentTime to 0.
However, in Hype, I’ve created the audio elements as global variables in Head HTML. As a result, getElementsByTagName returns an empty array. I assume this is because they aren’t being embedded in the DOM.
Is there an elegant way to do this without throwing them into the innerHTML of elements to make this work?