I have a 95-frame Lottie file and I want to trim the beginning so it starts at the 15 frame mark. It seems like there should be an easy way to do this, but I don't have After Effects. Is there some online editor or other way I can get a new .json file that represents the animation starting at 15 frames?
I tried using LottieRef.current.play(15, 95)
like this:
const lottieRef = useRef<LottieView>(null);
useEffect(() => {
if (lottieRef && lottieRef.current) {
lottieRef.current.play(15, 95);
}
}, [renderVideo, lottieRef]);
return (
<LottieView
ref={lottieRef}
source={SUCCESS.keepReading}
onAnimationFinish={game.onFinishAnimation}
autoPlay
loop={false}
style={styles.animationContainer}
/>
);
But when I added the onAnimationFinish
prop it calls the animation finish function right away instead of waiting til the animation has played through. So I want to edit the actual .json file (but if there's a fix where I can use this method instead and not have the issue with onAnimationFinish
that would be great too).