0
On the Google Doodle of 117th anniversary of Oskar Fischinger I realized that when you change the tab, the music stops playing, and when you go back to the page again, it keeps playing. I created an example using <audio>
. Behold:
<audio controls>
<source src="http://www.zedge.net/d2w/4/1631039/878827377/view/?mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
How to pause and start audio when switching tab?
In that reply there are the Focus and Blur methods. That when leaving the page you are pausing the video or audio through the Blur, and when back to focus is called the Focus there you continue to run your video or audio.
– Don't Panic