This can play HLS, DASH and SmoothStreaming files across all platforms.
For iOS, there are limitations:
- Video.js
A powerful and extensible web video player — this project builds upon its robust playback capabilities by wrapping it for use in Kotlin Multiplatform WASM/JS.
-
Hamamas/Kotlin-Wasm-Html-Interop
Special thanks for providing seamless HTML and DOM interop in Kotlin/WASM. This library made it possible to build this project without relying ondynamic
,js()
, or unsafe interop hacks. -
ShreyashKore/wonderous_compose
Helped me figure out the trick to make it run on Kotlin/JS. -
open-ani/mediamp (mediamp-vlc)
Thanks to this, Desktop support is now possible without requiring VLC to be installed on the system — VLC binaries are shipped with the application itself. -
MPEGDASHAVPlayerDemo
Thanks to this, I got some idea to parse DASH files for IOS. -
A big thanks to @tinku466 and @Vikesh for helping me with the SPM setup and the sample tvOS app — couldn’t have done it this smoothly without your support!
- Kotlin/WASM
- Kotlin/JS
- Kotlin/Desktop (bundled VLC binaries — no external installation needed)
- Android Phone/Tablet/XR
- iOS
- Android Wear(standalone)
- Apple TV
- Initialization
- Play
- Pause
- Dispose
- Change media
- Event tracking
- Custom UI
- Testing
- Will try for apple watch via companion app
Desktop support ships with pre-bundled VLC binaries, meaning it works even if VLC is not installed on the user’s machine.
desktopApp/
|- appResources/
| |- macos-arm64/
| | |- lib/
| | | |- libvlc.dylib
| | |- plugins/
| | | |- xxx.dylib
| |- macos-x64/
| | |- lib/
| | | |- libvlc.dylib
| | |- plugins/
| | | |- xxx.dylib
| |- windows-x64/
| | |- lib/
| | | |- libvlc.dll
| | | |- plugins/
| |- linux-x64/
| | |- lib/
| | | |- libvlc.so
|- src/
|- build.gradle.kts
- It is in very early stage, so mostly for development purposes. Once all platforms are integrated, we’ll deep dive into proper functionality.
- Currently, macOS binaries are included. You can extend this to other platforms by adding respective VLC builds.
- On the first run, VLC may take ~2 minutes to cache/generate
plugins.dat
.
From the second run onward, startup time reduces to ~7–10 seconds.