I'm doing a web app for a client that requires synchronization of animations with audio. I currently use "On Preload Ended" as the mechanism to determine the start-point of the audio, but that becomes limiting in the sense that I can't preload any other audio without it throwing off the synchronization.
Is there the ability to detect when an audio starts, or even just if it's playing at all?
Develop games in your browser. Powerful, performant & highly capable.
Audio is supposed to start when you use the action "Play" and set what sound to play.
To know when it is playing, set a global variable right after the "play" action.
Audio support in browsers is still messy, nothing more to do than those workarounds as far as I know.
But if there's preload to be done (even if it only takes a second), and I set a variable to 'true' right after the 'play' button, then my audio is out of sync.