diff --git a/livekit-android-sdk/src/main/java/io/livekit/android/compose/VideoRenderer.kt b/livekit-android-sdk/src/main/java/io/livekit/android/compose/VideoRenderer.kt index f7e34e4d..1888151e 100644 --- a/livekit-android-sdk/src/main/java/io/livekit/android/compose/VideoRenderer.kt +++ b/livekit-android-sdk/src/main/java/io/livekit/android/compose/VideoRenderer.kt @@ -83,7 +83,12 @@ fun VideoRenderer( DisposableEffect(currentCompositeKeyHash.toString()) { onDispose { - view?.release() + view?.let { + it.release() + videoTrack?.removeRenderer(it) + } + view = null + boundVideoTrack = null } }