airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
29.85k stars 2.85k forks source link

complete addEventListener doesn't always fire #3043

Open joshua-isaac opened 7 months ago

joshua-isaac commented 7 months ago

I noticed that when adding the complete event listener to the animation, it does not always fire on a mobile device (iPhone 13 Pro, iOS 17.0.3, Safari Browser).

Animation setup:

    const animation = bodymovin.loadAnimation({
      container: loaderLottie,
      path: "...",
      autoplay: false,
      loop: false,
    });

    animation.play();

    animation.addEventListener("complete", () => {
      alert("ANIMATION COMPLETE");
    });

Has anyone experienced this?