fixed resize

This commit is contained in:
LagradOst 2022-01-09 00:46:56 +01:00
parent a194cae245
commit e349339b5a
2 changed files with 2 additions and 11 deletions

View file

@ -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)
}

View file

@ -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