There is a JavaScript optimization that causes inactive tabs to slow down setInterval() and setTimeout()` in Firefox 5 and Chrome. I have it set for 66 miliseconds but it goes up to 1,000 when a tab is inactive.
There is way to determine how much time passed when the tab was inactive? I need JavaScript to keep running and performing actions, like playing sounds for some events.
Is there any way to achive that?
The whole point of those clamps is to keep background pages from using too much CPU. What events, exactly do you have going on in 15Hz that need to play sounds even though the user can’t see the tab?