From 514d4586a21863fa9bf50985adf52e2de2fbcd8e Mon Sep 17 00:00:00 2001 From: DieGon7771 Date: Wed, 18 Feb 2026 22:28:32 +0100 Subject: [PATCH 1/2] Fix trailer zoom on fullscreen exit --- .../ui/player/FullScreenPlayer.kt | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt index 2ba4c691ca..bbba1065aa 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt @@ -615,6 +615,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { } protected fun exitFullscreen() { + resetZoomToDefault() // if (lockRotation) activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER @@ -628,6 +629,29 @@ open class FullScreenPlayer : AbstractPlayerFragment() { activity?.window?.attributes = lp activity?.showSystemUI() } + private fun resetZoomToDefault() { + matrixAnimation?.cancel() + matrixAnimation = null + zoomMatrix = null + desiredMatrix = null + playerView?.videoSurfaceView?.apply { + scaleX = 1.0f + scaleY = 1.0f + translationX = 0.0f + translationY = 0.0f + invalidate() + } + playerView?.let { + if (it.resizeMode == AspectRatioFrameLayout.RESIZE_MODE_ZOOM) { + it.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT + } + } + playerView?.post { + playerView?.requestLayout() + playerView?.invalidate() + } + requestUpdateBrightnessOverlayOnNextLayout() + } override fun onResume() { enterFullscreen() @@ -2649,4 +2673,4 @@ open class FullScreenPlayer : AbstractPlayerFragment() { .start() } } -} \ No newline at end of file +} From 2186b831c8de35c365c3a087b2a43996bfa592ac Mon Sep 17 00:00:00 2001 From: DieGon7771 Date: Thu, 19 Feb 2026 14:52:09 +0100 Subject: [PATCH 2/2] Fix trailer zoom on fullscreen exit Minor change --- .../ui/player/FullScreenPlayer.kt | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt index bbba1065aa..2dfbb55986 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt @@ -630,27 +630,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { activity?.showSystemUI() } private fun resetZoomToDefault() { - matrixAnimation?.cancel() - matrixAnimation = null - zoomMatrix = null - desiredMatrix = null - playerView?.videoSurfaceView?.apply { - scaleX = 1.0f - scaleY = 1.0f - translationX = 0.0f - translationY = 0.0f - invalidate() - } - playerView?.let { - if (it.resizeMode == AspectRatioFrameLayout.RESIZE_MODE_ZOOM) { - it.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT - } - } - playerView?.post { - playerView?.requestLayout() - playerView?.invalidate() - } - requestUpdateBrightnessOverlayOnNextLayout() + if (zoomMatrix != null) resize(PlayerResize.Fit, false) } override fun onResume() {