diff --git a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt index 776c4512..23e7a0c0 100644 --- a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt +++ b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailFragment.kt @@ -388,11 +388,13 @@ class VideoDetailFragment() : MainFragment() { updateOrientation() } + val delayBeforeRemoveRotationLock = 800L + _landscapeOrientationListener = LandscapeOrientationListener(requireContext()) { CoroutineScope(Dispatchers.Main).launch { // delay to make sure that the system auto rotate updates - delay(300) + delay(delayBeforeRemoveRotationLock) _lastSetOrientation = Configuration.ORIENTATION_LANDSCAPE updateOrientation() } @@ -401,7 +403,7 @@ class VideoDetailFragment() : MainFragment() { { CoroutineScope(Dispatchers.Main).launch { // delay to make sure that the system auto rotate updates - delay(300) + delay(delayBeforeRemoveRotationLock) _lastSetOrientation = Configuration.ORIENTATION_PORTRAIT updateOrientation() }