From 429d5781f626d09944aa6782186aef0e50402610 Mon Sep 17 00:00:00 2001 From: 2018JunYoungLim Date: Thu, 7 Dec 2023 14:31:14 +0900 Subject: [PATCH] fix video playback error for TransformVideoPage --- .../java/com/goliath/emojihub/views/TransformVideoPage.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/app/src/main/java/com/goliath/emojihub/views/TransformVideoPage.kt b/android/app/src/main/java/com/goliath/emojihub/views/TransformVideoPage.kt index eefa60c2..8263f562 100644 --- a/android/app/src/main/java/com/goliath/emojihub/views/TransformVideoPage.kt +++ b/android/app/src/main/java/com/goliath/emojihub/views/TransformVideoPage.kt @@ -29,6 +29,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable +import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.setValue import androidx.compose.runtime.mutableStateOf @@ -74,6 +75,13 @@ fun TransformVideoPage( } } + DisposableEffect(Unit) { + onDispose { + exoPlayer.stop() + exoPlayer.release() + } + } + var createdEmojiList by remember { mutableStateOf>(emptyList()) } Scaffold(