diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt index 04d79017d..6ae432336 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/detail/VideoDetailScreen.kt @@ -805,6 +805,11 @@ private fun InlinePlayer( // fullscreen transition doesn't flash // black between detach + reattach. setKeepContentOnPlayerReset(true) + // Don't let the device timeout while the + // inline player is on-screen with the + // user reading the description. Detaches + // automatically when this view goes away. + keepScreenOn = true } }, update = { it.player = controller }, diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt b/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt index 02479cf99..e7b763148 100644 --- a/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt +++ b/strawApp/src/main/kotlin/com/sulkta/straw/feature/player/PlayerScreen.kt @@ -186,6 +186,14 @@ fun PlayerScreen( // over the surface. controllerHideOnTouch = true setKeepContentOnPlayerReset(true) + // Don't let the device timeout/lock while + // a fullscreen video is on-screen. View- + // level flag — propagates to the window + // while attached, clears on detach so + // backing out of fullscreen releases the + // wake-lock automatically. Mirror on the + // inline PlayerView for consistency. + keepScreenOn = true } }, update = { it.player = controller },