-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Description
The result of play(frame, frame) matches on iOS and web, but is off by +1 frame on Android.
Steps to Reproduce
- Create a barebones RN app
- Add
lottie-react-native - Update
metro.config.jsto include.lottiefiles - Use
play(frame, frame)to play a frame, usingsetTimeout()to ensure the animation is done loading
Expected behavior:
Same result on all platforms
Actual behavior:
iOS and web match, Android is off by +1
Example, playing frame 115 below on Android/web/iOS:

Frame 116:

Minimal reproduction
function App() {
const animationRef = React.useRef<LottieView>(null);
React.useEffect(() => {
const timer = setTimeout(() => {
animationRef?.current?.play(115, 115);
}, 500);
return () => clearTimeout(timer);
}, []);
return (
<SafeAreaView>
<LottieView
ref={animationRef}
source={require('./Lottie_OnOff_Microphone.lottie')}
style={{width: 300, height: 300}}
/>
</SafeAreaView>
);
}Lottie_OnOff_Microphone.lottie.zip
React Native Environment
Bare, 0.72.6
Lottie Version
6.3.1