Is there a way to use a video surface directly in ...
# compose-desktop
a
Is there a way to use a video surface directly in Compose Desktop? The only example I could find is the experimental video player in the Compose Multiplatform repository, which uses a SwingPanel. AFAIK, this method doesn't allow drawing any Compose components over it, which makes it impossible to build custom video controls with Compose.
e
if you create your own window and place a
SwingPanel
and
ComposePanel
in it, you should be able to layer them
unfortunately I don't think that will be a good experience either, as there's no way to avoid the software copy of the video copies through Swing
👍🏻 1
a
Is there no other way other than to use SwingPanel?
j
Don't write it in Flutter
z
I've been slowly working on a multiplatform media library that will avoid SwingPanel on desktop. It's using libmpv native API. This is new territory for me, so I have no idea when or if I will finish on my own
a
That sounds great! Do you already have a Github repo that I could check out?
z
yes. do you have a github repo? also interested in that
z
I haven't created the repository yet but when I do it'll be at https://github.com/zt64/compose-media
👍 1
android platform will use media3
d
You can use the VLCJ based VideoPlayer example without a SwingPanel, see https://github.com/JetBrains/compose-multiplatform/pull/3336
z
I'm trying to avoid vlc and bitmap
I've been working on a multiplatform library wrapping mpv right now I'm doing the core using JNI and everything is going well. development has been slow but I'm making progress https://github.com/zt64/mpv-kt I'm also starting work on an ffmpeg KMP wrapper
K 1
120 Views