-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems to stop working when page is not foreground #22
Comments
Browsers often suspend/slow down timeout/interval calls in background pages. It looks like chrome drops timer intervals to at most one per second, which will indeed break things. http://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs suggests a hack where you run the timer in a webworker and postmessage back, which looks like the only option, but I'm not sure how appropriate it is here. |
Well I've never done anything with webworkers before I guess... thanks for your help! |
I think a better approach will be to use hark on the remote stream with new webaudio APIs as opposed to the local stream, and sending it to the other end. That way, when backgrounded, you don't need to animate anyway. |
Xander you cannot use hark with a remote media stream as said in the On Sun, Feb 7, 2016 at 6:10 PM, Xander Dumaine [email protected]
|
Related: #24 |
If anyone still has this problem, use this library: It is mentioned at the stackoverflow thread, which latentflip posted. |
Seems to just stop emitting events if the page is in the background.
The text was updated successfully, but these errors were encountered: