https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
a

Aykut Yilmaz

11/07/2023, 4:30 AM
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

ephemient

11/07/2023, 4:53 AM
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

Aykut Yilmaz

11/07/2023, 4:40 PM
Is there no other way other than to use SwingPanel?
j

Jimmy Nelle

11/07/2023, 7:21 PM
Don't write it in Flutter
z

zt

11/08/2023, 7:18 AM
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

Aykut Yilmaz

11/08/2023, 5:35 PM
That sounds great! Do you already have a Github repo that I could check out?
z

Zoff

11/08/2023, 7:21 PM
yes. do you have a github repo? also interested in that
z

zt

11/08/2023, 7:27 PM
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

drew

11/15/2023, 4:37 PM
You can use the VLCJ based VideoPlayer example without a SwingPanel, see https://github.com/JetBrains/compose-multiplatform/pull/3336
z

zt

11/15/2023, 4:37 PM
I'm trying to avoid vlc and bitmap
5 Views