Open fougere-mike opened 2 years ago
Did you use VideoPlayer in a separate project?
Yes. I used it in a compose multiplatform project.
If so, how did you add VideoPlayer to your build.gradle dependencies?
I copied the VideoPlayer module into the new project, then added it to the "common" module's build.gradle.kts:
kotlin {
android()
jvm("desktop") {
compilations.all {
kotlinOptions.jvmTarget = "11"
}
}
sourceSets {
val commonMain by getting {
dependencies {
api(compose.runtime)
api(compose.foundation)
api(compose.material)
implementation(project(":VideoPlayer:library")) // <---------- VideoPlayer component
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val androidMain by getting {
dependencies {
api("androidx.appcompat:appcompat:1.2.0")
api("androidx.core:core-ktx:1.3.1")
}
}
val androidTest by getting {
dependencies {
implementation("junit:junit:4.13")
}
}
val desktopMain by getting {
dependencies {
api(compose.preview)
}
}
val desktopTest by getting
}
}
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
The (experimental) VideoPlayer component does not appear to support HLS video playback.
The play(url) call within DesktopVideoPlayer returns true, but there is no video or audio.
Tested with this sample stream: https://multiplatform-f.akamaihd.net/i/multi/will/bunny/big_buck_bunny_,640x360_400,640x360_700,640x360_1000,950x540_1500,.f4v.csmil/master.m3u8
Playing this URL with the VLC desktop application works as expected.
Note: The URL for the mp4 file included with the demo does playback correctly.
System Info: