Whats current state of compose web, possible to us...
# compose-web
j
Whats current state of compose web, possible to use it with common KMP libs? Like Jetbrains, Androidx, Ktor, Koin and such. Or does most libraries omit wasm/web as they did for a while still?
b
It's hard to answer that question, it will depend on each individual library.
A library needs to have a Js and/or Wasm target to be compatible, that's it
j
Yeah thats why I ask here, not sure how to evaluate this other than hope someone else using the most common libs on web here in some kind of project. Also there are multiple web targets making it more complex. I know some projects in the past had struggles with Wasm, because a lot of limitations. I know Google didnt add it into androidx libs until recently in most libs.
Also do you know if there is any good way of check which libs supporting wasm? Its very time consuming check each repo and hope they have a github and then check in src folders if wasm is there.
b
looks like klibs.io has that information (e.g. for Ktor: https://klibs.io/project/ktorio/ktor)
ah you can even filter by target 💡
j
Ah nice, forgot about that page, thanks 🙂 Not all is accurate though I notice, but mostly. Looks like the most common libs for CMP seems to support Wasm, so probably worth a shot to see if it works well with Web for projects I am working on. Earlier it was completely useless, yeah I understand it was kind of pre-alpha but expect it to at least run and some libs support it.
👍 1
b
let us know how this goes!
j
Ideally it will be an easy container adding into composeApp module with extra target added into my convention plugin, but we will see, thanks 🙂
One thing complex I need to resolve is my custom solution for Video rendering, using AvPlayer on iOS And ExoPlayer on Android, not sure what web supporting 😄
b
I've heard good things about this one: https://github.com/kdroidFilter/ComposeMediaPlayer
j
Yeah looks easy integrate HtmlVideoPlayer thingy, https://github.com/kdroidFilter/ComposeMediaPlayer/tree/master/mediaplayer/src/wasmJsMain/kotlin/io/github/kdroidfilter/composemediaplayer I want to avoid depend on video libs and then config them to match my usecase, in my case I want a looping video as background on a login screen.
m
Just looking whether a library claims to support the web targets is not enough because many libraries just don’t support all features for these targets. So it may happen that things first look good but when you are in the middle of your project you realise that one important feature you need is not supported. Example: Okio supports wasmJs in general but does, e.g., not support the ZIP file system (although they could) which is available on other platforms. I find the fragmentation and incompleteness of CMP more and more frightening.
j
Haha yeah thats another fair point, which I semi discover now. As of example how to apply Google Play Services in web to have Notifications or Firebase. I forgot how painful that was to deal with. However looks like the features I use should be supported in all libs in the project I am testing on 🙂 But yeah failing with gradle convention plugin already for web, as colliding with my Android setup. This is fun.
Got stuck at library https://github.com/GitLiveApp/firebase-kotlin-sdk which doesnt seems to support webWasm 🙂