Closed
Description
I just found out that Skia has a brand new native player for Lottie files: https://skia.org/user/modules/skottie
It would be amazing if that was surfaced in the Flutter framework, allowing developers to easily use Lottie animations with security and performance, without needing unofficial third party plugins.
(Edit by @dnfield): If you're looking for Lottie support, as of 2019-09-05, your best bet is to work with the Flare plugin: https://twitter.com/2Dimensions/status/1169294765625618432
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
zoechi commentedon Aug 23, 2018
/cc @dnfield
lukepighetti commentedon Sep 1, 2018
I had no idea this was available on Skia. How difficult is it to add to Flutter? Besides native textfield performance on iOS, Lottie is a big priority for me personally.
zoechi commentedon Sep 1, 2018
https://pub.dartlang.org/flutter/packages?q=lottie
slightfoot commentedon Sep 1, 2018
@zoechi both those packages go through the Android platform to render and display, and I don't think either have iOS support. Skottie however would be awesome to get in the Flutter Engine, so we can get direct Skia -> GPU rendering of Lottie style animations.
dnfield commentedon Sep 2, 2018
One of them is actually Dart based. The other is Android only and uses the Lottie Android code.
Engine level support might be a tough sell because of increased engine size.
lukepighetti commentedon Sep 2, 2018
@zoechi that package only works on half of the platforms Flutter advertises as supporting
lukepighetti commentedon Sep 2, 2018
Is it possible to add it as an optional module to the engine?
dnfield commentedon Sep 2, 2018
https://pub.dartlang.org/packages/lottie_flutter works on Android and iOS, but is still experimental and needs some work.
There's no facilities currently for optional modules in the engine, but it'd be nice if it could work.
lukepighetti commentedon Sep 2, 2018
Just throwing out ideas/questions. Is it feasible to have two versions of the engine, one stripped, and one "multimedia"? Any ideas how much larger the base package size would be if Skottie were added?
As an outsider, finding Skottie in native Skia just seems like incredibly low hanging fruit, especially when the page says
The code is part of Skia’s library but can also be made available as a separate package.
https://github.com/google/skia/blob/master/modules/skottie/include/Skottie.hslightfoot commentedon Sep 2, 2018
@dnfield I agree we don't want to make the engine larger than it needs to be, but with AnimatedIcon and with a huge emphasis on animation in modern apps I can see huge value in its inclusion.
The real question, is how much bigger does it make it? I don't know enough about Lottie to really say.. But as far as I see it its just including JSON parsing and minimal animation engine; since Skia already supports all the drawing operations I can't see this adding a lot.
@dnfield I've still not been able to build the engine. Do you think it would be possible for you to adjust your engine build to add the build flag to include it and see how much it adds? I understand this will be debug so extra meta-data and symbols will be included, but the ratio to before and after will really answer this question.
Then I think it would be great idea to see we would could do in terms of putting together a Dart front-end to test it out. @dnfield If your interested, we can work on all this together.
lukepighetti commentedon Sep 2, 2018
@dnfield Please say yes. 🙏
110 remaining items