LottieSharp
LottieSharp copied to clipboard
Allowing loading lottie content to be set from code behind
Hi folks,
I will have lotties files stored within a database, so I can't use the filename property. I would like to have something like a content property which can be set from code behind.
Any plans on this?
If not, I'm willing to implement it and share...
This is a good idea. Because of the time limitation for the moment we cannot implement new features. It's would be nice if you can do it.
Actually I found a way to implement it with the current featue set:
- you need a StringReader X which holds the actual json data then
- create a Y = new LottieSharp.JsonReader(X)
- and then call SetAnimationAsync(y, "test")
"test" is any given name for the animation which seems to be needed for caching. The other option, calling SetAnimationAsync(Y) didn't work.
I could only provide my VB# test scripting, I current have no C# example.