Closed cbun097 closed 3 years ago
+1
Can you try calling playAnimation()
on your lottieview instance and see if that kicks it off?
for me playAnimation()
does not kicks it off, but nothing happens and completionBlock
never gets called
Same issue here, running on Vue. Tried with various setups such as autoplay or, like the example below, playAnimation() in the loaded method:
lottieLoaded(args) {
console.log("lottie loaded", args.object);
args.object.playAnimation();
console.log("lottie animating", args.object.isAnimating());
},
CONSOLE LOG: lottie loaded LottieView(6)
CONSOLE LOG: lottie animating false
Same here, also on Vue!
Have someone found a solution to this? Any news @bradmartin ?
+1
Looked like its a timing issue -
lottieLoaded(args) {
setTimeout(() => {
args.object.playAnimation();
}, 500);
}
will work .
Great with some workaround @mcalc001, I managed to fix it at my end without the timeout though.
Embarrassing enough, I missed that you had to update the src reference on your LottieViews with res:// If it helps anyone else, the lottie files (json) still resides under App_Resources/iOS, however don't forget to add res:// like so:
src="res://my-lottie-file.json"
I've gone ahead and published 5.0.3
with a simple timeout (0)
around the playAnimation
method which seems to fix the demo apps on iOS 14. Hopefully others can confirm this fixes their apps. It's not perfect but it seems to help in some scenarios.
for me it does not solved the problem
@wendt88 can you open a new issue with the full extent of your code (package.json, relevant usage of lottie as well)?
The plugin works renders well with any Android devices, on iOS is rendered but it doesn't not display. I tried with iOS emulator ios 12,13 and 14 (iPhone and iPAd) and also giving width and height.
Repo: https://github.com/cbun097/nativescript
Angular: 10 NativeScript: 7
Thanks!