Can we load json and images from remote server to render lottie animations in iOS?
yes,I'm using the lib just like this
Can i see sample code for that
On 08-Apr-2018 6:16 PM, "Lee, Bo" notifications@github.com wrote:
yes,I'm using the lib just like this
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/airbnb/lottie-ios/issues/600#issuecomment-379547939,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEwfWJU81vmwg2hrKnBG7BdHQ3DqsymZks5tmgangaJpZM4TFeUV
.
Hello Lee,
I added code for load images from remote server to render dynamic lottie json animations in iOS from remote server.
Could you please review and commit on lottie frame work
Theres already code in the framework for that
https://github.com/airbnb/lottie-ios/blob/master/lottie-ios/Classes/PublicHeaders/LOTAnimationView.h#L38
@buba447 These do not support remote images resource rendering. Just support only JSON file resource.
If I'm right - (nonnull instancetype)initWithContentsOfURL:(nonnull NSURL *)url; does:
LOTComposition *laScene = [[LOTComposition alloc] initWithJSON:animationJSON withAssetBundle:[NSBundle mainBundle]];, so the assets are still loaded from the main bundle. Are you gonna add the feature somehow in future, or should I try to tailor it and make a PR? Thank you
Hi @premyslvlcek. Have you got any possible solution for loading the images directly from the URL? Any help is appreciated.
yes , i modified few methods in lottie library to get it work.
Thanks,
kanakaraju
On Sat, Jun 30, 2018 at 1:21 AM, Bhavuk Jain notifications@github.com
wrote:
Hi @premyslvlcek https://github.com/premyslvlcek. Have you got any
possible solution for loading the images directly from the URL? Any help is
appreciated.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/airbnb/lottie-ios/issues/600#issuecomment-401456880,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEwfWKSaxnjXpF-VtNXCVEBZSZyLqRRxks5uBoVNgaJpZM4TFeUV
.
Hey @bhavukjain1, feel free to check my fork of this library, which adds support for loading images from dictionary. The key in the dictionary is the name of the image in the lottie json, for example img_01.png. The code is not final, but it works, sorry if there are some bugs, I haven’t seen obj-c for long time. It doesn’t support loading from the url, but you can load the image from the remote url yourself and then put it into the dictionary. See method called: “(nonnull instancetype)animationFromJSON:(nullable NSDictionary *)animationJSON assets:(nullable NSDictionary *)assetsDictionary NS_SWIFT_NAME(init(json:assets:));”
https://github.com/premyslvlcek/lottie-ios/tree/imagesOutsideBundles?files=1
Hey @premyslvlcek. Great work! Works perfectly, thanks.
Does anyone know how to load json files from firebase