https://kotlinlang.org logo
Title
r

rsktash

02/26/2021, 5:16 PM
Hi is there a plan to support javafx? We are encountering for java lib deficiency. For example mp3 playing library
j

jim

02/26/2021, 5:51 PM
I think directly supporting javafx is not on our foreseeable roadmap, but Compose has good interoperability with swing and swing has good interoperability with javafx, so it should be possible to achieve anything you need to do by passing through swing (not the most beautiful solution, but should work as a workaround). Having said that: I'm skeptical of the cleanliness of a solution which pulls in javafx in order to play the MP3 format. I remember several years ago, I wanted to play MP3s in Java code, and I remember struggling through it (harder than it should have been, but very possible without taking a dependency on javafx). I don't remember how I did it, and probably there are newer/better solutions nowadays, but that is outside the scope of Compose and so I doubt anyone in this channel would be able to give you better advice than what you could find with a bit of searching. It is more of a generic "java" question at that point.
🤔 1
r

rsktash

02/26/2021, 5:56 PM
Thank you. I’ll try other java libs
o

olonho

02/26/2021, 6:02 PM
JavaFX support is not planned at JB currently, however media (video and audio) player is, see prototype at https://github.com/JetBrains/compose-jb/tree/master/components/VideoPlayer
👀 2
r

rsktash

02/26/2021, 6:13 PM
WOW. Thank you @olonho