Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

Android LottieDrawable in iOS #300

Closed msegced closed 3 years ago

msegced commented 4 years ago

💬 Questions and Help

Hello, I have a Xamarin Android project where I export each frame of the Lottie project to a drawable (using LottieDrawable) in background. With each exported frame I convert it to a BitmapDrawable and mux it with each frame of a video.

I can export each frame (based on https://github.com/damikdk/LottieExportDemo) in native iOS using AVAssetWriter but the animationView has to be in foreground and it has to be played before each frame can be captured.

After I have the drawable I can use Metal to make a new video muxing both frames.

The questions are:

Is there a an equivalent to LottieDrawable in lottie xamarin form iOS?

If not, How can I get a drawable from each lottie frame in xamarin ios?

Any help would be very appreciated.

For questions or help we recommend checking:

martijn00 commented 3 years ago

This is now exposed in the event that was already there: https://github.com/Baseflow/LottieXamarin/blob/develop/Lottie.Forms/AnimationView.cs#L297

https://github.com/Baseflow/LottieXamarin/blob/develop/Lottie.Forms/Platforms/Ios/AnimationViewRenderer.cs#L53