You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're using the web component version of our player, you're in luck! This functionality is inherently supported. The player automatically begins playing the animation once it becomes visible on the screen. You can refer to the implementation here for more details: dotLottie Player Component - Visibility Feature.
If you are using the React player (@dotlottie/react-player), this feature isn't built-in as of now. However, you can achieve the desired behavior by utilizing the IntersectionObserver API.
Hope this helps you implement the visibility-based playback control in your project. Let us know if you have any more questions or need further assistance!
kenvlo
pushed a commit
to kenvlo/Lottie-Showcase
that referenced
this issue
Jul 26, 2024
how to start the dot lottie animation when the lottie player is visible on the screen not when rendered on the screen
The text was updated successfully, but these errors were encountered: