Search code examples
react-nativecodenameonewebp

is Webp supported in codename one?


I've looking to experiment a new app with something that is not react native and found codename one.

It seems kind of superior, since the binary size is smaller and there is java/kotlin support (this is a downside for me since I have never developed with that language) . BUT, a prerequisite for me to use codename one in this app is that I don't know if it supports webp. I can see that it supports gif's by an external library, and it has native video incorporated (which neither react native or nativescript has), but I need animated webp support.

If not... since codename one is "native", can I use fresco to decode webp inside codename one?


Solution

  • We support videos through native playback which means "we don't know". If the native OS will support webp then opening the file with the media player will work if it doesn't then it won't. I'm pretty sure it won't work on the simulator but I can't tell you whether it will work on the device.

    You can use fresco for Android decoding and playback using native interfaces. That means you will need to find similar libraries for iOS and any other such platform you wish to support.

    Alternatively, if you have a webp decoder written in Java you could port it to Codename One and it should work everywhere.