val mpv = remember {
Mpv().apply {
setProperty("hwdec", Node.String("auto")).getOrThrow()
setProperty("vo", Node.String("libmpv")).getOrThrow()
setProperty("cache", Node.String("yes")).getOrThrow()
setProperty("cache-secs", Node.String("30")).getOrThrow()
setProperty("demuxer-max-bytes", Node.String("200MiB")).getOrThrow()
initialize().getOrThrow()
}
}
val coroutineScope = rememberCoroutineScope()
Box(
modifier = Modifier
.fillMaxSize()
.background(MovieAppTheme.Colors.dark)
) {
VideoSurface(mpv, Modifier.fillMaxSize(), onInit = {
coroutineScope.launch {
mpv.commandAsync(
"loadfile",
"https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8"
).getOrThrow()
//mpv.setProperty("video-rotate", Node.Int64(180)).getOrThrow()
//mpv.setPropertyAsync("loop-file", Node.String("inf")).getOrThrow()
}
})
}
After initialization, the console displays the error "Failed to load plugin 'libdecor-gtk.so': failed to init"
and there is no sound on any video.
After initialization, the console displays the error "Failed to load plugin 'libdecor-gtk.so': failed to init"
and there is no sound on any video.