I am using RtspSurfaceView in jetpack compose like this
DisposableEffect(Unit) {
onDispose {
// Stop the video when the composable is disposed
rtspSurfaceView?.stop()
}
}
AndroidView(
modifier = Modifier
.fillMaxSize()
.aspectRatio(16 / 9f),
factory = { context ->
RtspSurfaceView(context).apply {
init(uri, username, password)
start(requestVideo = true, requestAudio = false)
setStatusListener(rtspStatusListener)
debug = true
rtspSurfaceView = this
}
}
)
I get "Failed to start HARDWARE video decoder (The surface has been released)" & "Failed to start video software decoder. Exiting..." errors when I close and reopen clients multiple times.
I am using RtspSurfaceView in jetpack compose like this
I get "Failed to start HARDWARE video decoder (The surface has been released)" & "Failed to start video software decoder. Exiting..." errors when I close and reopen clients multiple times.
How can I get it work in Jetpack Compose