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

Not sure if bug or dumb — Lottie-Web does not seem to follow pause() method consistently #3063

Open
zachblackandred opened this issue Jan 25, 2024 · 0 comments

Comments

@zachblackandred
Copy link

Tell us about your environment
Exporting JSON with Bodymovin plugin version 5.12.1 from After Effects on MacOS 14.2.1

  • Browser and Browser Version:
    Chrome Version 120.0.6099.234
  • After Effects Version:
    24.0.1

What did you do? Please explain the steps you took before you encountered the problem.
Built an animation and exported Lottie JSON data to be played in an HTML5 deliverable (minimum reproducible example included HERE). Created an event listener that fires helper functions [allPause(), allPlay()]based on if the content is visible or not, calling the pause() method on our Lottie animation when visibility is lost, then play() when regained.

What did you expect to happen?
For the animation to pause on switching tabs.

What actually happened? Please include as much relevant detail as possible.
The animation does not pause on visibility change or does not successfully pause, i.e. on switching browser tabs and then switching back, time-stamped console messages confirm that the helper functions fired as intended at appropriate times, but the animation skips ahead on returning, instead of resuming from the point reached before switching tabs.

Manually calling either allPause() or anim.pause(), then allPlay() or anim.play() seems to pause and then correctly resume the animation without skipping forward on resume.

Please provide a download link to the After Effects file that demonstrates the problem.
https://shot.blackandred.io/qGuBd4z2

I'm pretty sure I'm not just making a critical noob JS error but ya never know! Any help is appreciated.

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

1 participant