can i use Exoplayer for Desktop ?
# compose-desktop
y
can i use Exoplayer for Desktop ?
m
On windows: make sure that you have a 64bit version of VLC installed (64bit JVM and 32bit VLC won't talk)
Also when using the release version, make sure to add progaurd rules: https://github.com/caprica/vlcj/issues/1210
👍 1
j
@Mike Dawson That library doesnt work at all for me with that exact code on Mac os with M2 ARM chip. Do you know if need something special? Also trying get both local video vs url video working. Using vlcj for desktop, exoplayer on Android, iOS Avplayer. For wasm I think about using HTML interop and using video html tag.
m
I haven't tested on Mac - our app is an education app for limited resource / limited connectivity areas, so we don't meet too many Apple devices
We're not even putting out .dmg files
On Ubuntu/Linux - when the VLC package was installed, it "just worked"
On Windows - that was a little more fun - it wouldn't detect VLC if the 32bit VLC was installed (as mentioned above). Once the 64 bit version of VLC was installed, everything was fine
The example library uses a slightly older version of VLC4J, you could check what is the latest version and update the vlc4j dependency.
that's about all I can recommend. Other than that, you'll have to go through the VLC4J issues and/or post an issue there. If you can, test on a non-apple device to see if your issue is only on Mac, or applies to other targets.
j
In my case it says vlc lib not found at all. Too bad, felt like a good solution. Not sure if vlc the best option or not. I only using Mac here, so cant test other. Or well could use VM but not same.
Updated to version 4.8.2 no difference. Do I need embed libvlc somewhere or install package on Mac?
👍 1
m
I did a fair bit of searching and didn't come across anything that even look like it came close. You can use the Swing interop to embed anything that has a Swing component, or JFX component. It seems like Java Media Framework looks obsolete these days. If WebViews were working well, then you could try that and using a video tag (spoiler alert: they don't seem to work well or at all for me).
The only alternative approach I can suggest, if opening in a new window is acceptable, you can launch a video using chrome with --app (url) (--app hides address bar etc).
s
Hello there, did you guys come up with a solution / video player library that can be used in desktop?
s
Thanks, appreciate that.
k
it looks like the earlier shared links, JB original experimental folder containing VideoPlayer component in this thread are more up to date and better maintained - but they look mostly the same and they both use vlcj for desktop. I got it to work nicely on OSX as well, but I had to change my system's installed VLC binaries from amd64 to arm64 . I must have installed the wrong binaries ages ago. disabled the controls & listeners, displaying overlays on top of video stream loops, make things draggable, add inwards shadow on it, works fine Although this is weird, why should a stdlib API rely on installed system libraries instead of embedding the right libraries via gradle ?
253 Views