I've created an Edge animation that syncs up with an audio voiceover file. It uses the HTML5 audio tag with a simple javascript command from Edge to play the audio. It works great. But if I run it in Google's Chrome browser with mutliple tabs running, and I switch tabs in the middle of an animation, I run into a problem. The timeline appears to pause but the audio keeps going. Then when I switch back, the animation continues, but it is now out of sync with the audio.

So, is there a way to capture the tab-switching event and pause the audio, then of course restart it when the page regains the focus?

An alternative would be to have some sort of listener to constantly check that the audio is in sync, but I imagine that would get quite messy. I figure, worst case is that I need to include a "restart animation" button for the user to hit if it does go out of sync.