From e349339b5a376ffbd0a2757c1332fbb889c3b49a Mon Sep 17 00:00:00 2001 From: LagradOst Date: Sun, 9 Jan 2022 00:46:56 +0100 Subject: [PATCH] fixed resize --- .../cloudstream3/ui/player/AbstractPlayerFragment.kt | 12 ++---------- .../cloudstream3/ui/player/GeneratorPlayer.kt | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt index 43245d7a..6e592982 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/AbstractPlayerFragment.kt @@ -310,20 +310,12 @@ abstract class AbstractPlayerFragment( fun resize(resize: PlayerResize, showToast: Boolean) { setKey(RESIZE_MODE_KEY, resize.ordinal) val type = when (resize) { - PlayerResize.Fill -> AspectRatioFrameLayout.RESIZE_MODE_FIT - PlayerResize.Fit -> AspectRatioFrameLayout.RESIZE_MODE_FILL + PlayerResize.Fill -> AspectRatioFrameLayout.RESIZE_MODE_FILL + PlayerResize.Fit -> AspectRatioFrameLayout.RESIZE_MODE_FIT PlayerResize.Zoom -> AspectRatioFrameLayout.RESIZE_MODE_ZOOM } player_view?.resizeMode = type - exo_play?.setOnClickListener { - player.handleEvent(CSPlayerEvent.Play) - } - - exo_pause?.setOnClickListener { - player.handleEvent(CSPlayerEvent.Pause) - } - if (showToast) showToast(activity, resize.nameRes, Toast.LENGTH_SHORT) } diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt index 4ef52018..a272b431 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt @@ -29,7 +29,6 @@ import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage import kotlinx.android.synthetic.main.fragment_player.* import kotlinx.android.synthetic.main.player_custom_layout.* -// TODO Auto select subtitles class GeneratorPlayer : FullScreenPlayer() { companion object { private var lastUsedGenerator: IGenerator? = null