feat: hide video controls on playback start
Video controls are now hidden by default when playback begins. Users can tap to reveal them. Previously, controls were shown for 2 seconds before auto-hiding (TwoSecondController) or shown by default (VideoViewInner). https://claude.ai/code/session_01WpAqbodB5w8oDJpN6MLBs6
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ fun VideoViewInner(
|
||||
authorName: String? = null,
|
||||
nostrUriCallback: String? = null,
|
||||
automaticallyStartPlayback: Boolean,
|
||||
controllerVisible: MutableState<Boolean> = mutableStateOf(true),
|
||||
controllerVisible: MutableState<Boolean> = mutableStateOf(false),
|
||||
onZoom: (() -> Unit)? = null,
|
||||
accountViewModel: AccountViewModel,
|
||||
) {
|
||||
|
||||
+1
-7
@@ -124,7 +124,6 @@ import okhttp3.coroutines.executeAsync
|
||||
import okio.sink
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
// Delay before cleaning up shared video temp files.
|
||||
// Allows time for receiving app to copy the file after user confirms share.
|
||||
@@ -224,12 +223,7 @@ fun TwoSecondController(
|
||||
content: BaseMediaContent,
|
||||
inner: @Composable (controllerVisible: MutableState<Boolean>) -> Unit,
|
||||
) {
|
||||
val controllerVisible = remember(content) { mutableStateOf(true) }
|
||||
|
||||
LaunchedEffect(content) {
|
||||
delay(2.seconds)
|
||||
controllerVisible.value = false
|
||||
}
|
||||
val controllerVisible = remember(content) { mutableStateOf(false) }
|
||||
|
||||
inner(controllerVisible)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user