Skip to content

Add support/surface Skottie (Skia's Lottie player) #20438

Closed
@rock3r

Description

@rock3r
Contributor

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

Activity

added
c: new featureNothing broken; request for a new capability
frameworkflutter/packages/flutter repository. See also f: labels.
engineflutter/engine repository. See also e: labels.
on Aug 23, 2018
added this to the Goals milestone on Aug 23, 2018
zoechi

zoechi commented on Aug 23, 2018

@zoechi
Contributor
lukepighetti

lukepighetti commented on Sep 1, 2018

@lukepighetti
Contributor

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.

slightfoot

slightfoot commented on Sep 1, 2018

@slightfoot
Member

@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

dnfield commented on Sep 2, 2018

@dnfield
Contributor

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

lukepighetti commented on Sep 2, 2018

@lukepighetti
Contributor

@zoechi that package only works on half of the platforms Flutter advertises as supporting

lukepighetti

lukepighetti commented on Sep 2, 2018

@lukepighetti
Contributor

Is it possible to add it as an optional module to the engine?

dnfield

dnfield commented on Sep 2, 2018

@dnfield
Contributor

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

lukepighetti commented on Sep 2, 2018

@lukepighetti
Contributor

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.h

slightfoot

slightfoot commented on Sep 2, 2018

@slightfoot
Member

@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

lukepighetti commented on Sep 2, 2018

@lukepighetti
Contributor

@dnfield Please say yes. 🙏

110 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityengineflutter/engine repository. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @TomasLinhart@maks@rock3r@renanyoy@hpoul

        Issue actions

          Add support/surface Skottie (Skia's Lottie player) · Issue #20438 · flutter/flutter