Reputation: 69
I have Kotlin multiplatform project and I want to play local video on the screen. My KMP project is Desktop only, so I don't have to worry about iOS and Android. Video is located locally at my PC, so it's not a online video. What is a proper way of doing it?
I saw some solutions using JavaFX, but I was unable to integrate it in my project properly.
Upvotes: 0
Views: 791
Reputation: 133
You can checkout the Library for Playing Videos using Compose Multiplatform and also Supports Android, iOS, Desktop, Js and Wasm as well. MediaPlayer-KMP
Upvotes: 0
Reputation: 1669
The compose-multiplatform repo contains sample code for a video player:
If you look at the code you can see it depends on vlcj, a java wrapper around the VLC media player.
Upvotes: 0