mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed resize
This commit is contained in:
parent
a194cae245
commit
e349339b5a
2 changed files with 2 additions and 11 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue