does compose multiplatform has Videoplayer?
# compose-ios
a
does compose multiplatform has Videoplayer?
j
No, but I think adding a KMP library for it maybe. You can do expect actual. iOS, use AVPlayer with kotlin interop. Android use androidx exoplayer. Desktop use vlcj library. For wasm not sure yet 😁
m
This MediaPlayerController.kt demonstrates Kotlin Interoperability with the iOS native
AVPlayer
. It’s also possible to use existing iOS
UIView
within Compose tree using
UIKitView
as this blogpost demonstrates.
👍 1
a
I think compose multiplatform should have videoplayer composeview natively without using expect/actual.
m
I’m not sure it does, unless someone has made a module
see last comment on thread
j
@Abdullah I disagree, not compose multiplatforms job to provide video player imo. However I think community should strive more stop re-invent the wheel everytime and start doing open source libraries we can share. Maybe however I thikn CMP should provide a way of reference a video file, that can be used, like streams, uris, urls, local file etc. There is no way for compose doing this natively, as not even OS:es itself has it. I mean like Android needs exoplayer library and desktop needs something like VLC 😄
372 Views