LottieFiles / lottie-interactivity

A small javascript library to enable interactivity with Lottie animations
https://lottiefiles.com/interactivity
MIT License
430 stars 55 forks source link

Next js 14 catch bug on mode:"chain" #116

Closed MerantauWarrior closed 6 months ago

MerantauWarrior commented 9 months ago

Overview

Your configuration(https://docs.lottiefiles.com/lottie-interactivity/configuration-and-usage#configuration-for-react) doesn't suits for Next 14 in my case.

So my solution was to use setTimeout() with 1 second delay but it's not correct it's now react way.. Can you suggest more elegant solution or tell me where I've done the mistake? Cuz I don't know will it work with 1second delay in not localhost environment and if Server/Hosting will need more time to give me the html

setTimeout(()=>{ create({ player: ref.current, mode: 'chain', actions: [ { state: 'autoplay', transition: 'repeat', repeat: 2 }, { path: '/lottie/particles.json', state: 'autoplay', frames: [0, 110], transition: 'onComplete', reset: true, } ] }); },1000) ...

Consuming repo

https://github.com/MerantauWarrior/framer-test/blob/main/src/animations/lottie/interactions/chainDynamic.jsx

What repo were you working in when this issue occurred?

...

Labels

github-actions[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.