Merge pull request #3771 from Bnyro/master

Enter/Exit fullscreen gesture on whole screen if swipe gestures disabled
This commit is contained in:
Bnyro 2023-05-15 14:15:47 +02:00 committed by GitHub
commit 04c9b9488e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -686,14 +686,20 @@ internal class CustomExoPlayerView(
} }
override fun onSwipeLeftScreen(distanceY: Float) { override fun onSwipeLeftScreen(distanceY: Float) {
if (!PlayerHelper.swipeGestureEnabled) return if (!PlayerHelper.swipeGestureEnabled) {
if (PlayerHelper.fullscreenGesturesEnabled) onSwipeCenterScreen(distanceY)
return
}
if (isControllerFullyVisible) hideController() if (isControllerFullyVisible) hideController()
updateBrightness(distanceY) updateBrightness(distanceY)
} }
override fun onSwipeRightScreen(distanceY: Float) { override fun onSwipeRightScreen(distanceY: Float) {
if (!PlayerHelper.swipeGestureEnabled) return if (!PlayerHelper.swipeGestureEnabled) {
if (PlayerHelper.fullscreenGesturesEnabled) onSwipeCenterScreen(distanceY)
return
}
if (isControllerFullyVisible) hideController() if (isControllerFullyVisible) hideController()
updateVolume(distanceY) updateVolume(distanceY)