fix: crash when opening video in landscape with autofullscreen enabled

This commit is contained in:
Bnyro 2024-11-24 13:40:30 +01:00
parent 0c12495915
commit 4b00c0a2fc

View File

@ -1182,6 +1182,8 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
}
private fun setPlayerResolution(resolution: Int, isSelectedByUser: Boolean = false) {
if (!::playerController.isInitialized) return
val transformedResolution = if (!isSelectedByUser && isShort) {
ceil(resolution * 16.0 / 9.0).toInt()
} else {