-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
SUSPEND ON VISIBILITY CHANGE demo seems not right #859
Comments
That's the opposite of how it works. When set to true, it will stop when visibility is lost. When set to false, it continues regardless. |
for me, no matter set |
That might be due to your browser, it functions fine on Firefox on macOS. I wouldn't be surprised if Chrome (if that's what you use, you didn't say) does something to interfere with that functionality but I can't find any documentation if it does. |
I would love to be proven wrong but I don't believe this is possible any more. #701 solved this issue by fixing the event handling for the 'visibilitychange' event. However, even if you force the page to always be visible despite the event happening, it still does not work.
I'm assuming this is because requestAnimationFrame() is paused by default for most browsers to stop battery drainage. See here: https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
when switch to false, I think the animation should stop
Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: