Skip to content
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

Refocussing Chrome tab resumes playback #74

Open
mulhoon opened this issue Apr 23, 2019 · 1 comment
Open

Refocussing Chrome tab resumes playback #74

mulhoon opened this issue Apr 23, 2019 · 1 comment

Comments

@mulhoon
Copy link

mulhoon commented Apr 23, 2019

Hi!
Great library!

I have an issue - I control an animation with .set() and then change tab, when I click back on the tab, the animation automatically plays. How can I stop it playing automatically?

I think it' related to this.
https://github.com/camoconnell/lazy-line-painter/blob/4908749499a03586cd9e026ad6b4e0b9231ede38/src/index.js#L67

Thanks

davidarny pushed a commit to davidarny/davidarutiunian.github.io that referenced this issue May 9, 2019
@davidarny
Copy link

davidarny commented May 9, 2019

+1

I solved this by cloning svg element and calling destory on complete callback
_onVisibilityChange probably should resume only if animation is playing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants