Merge pull request #6818 from Bnyro/master

fix: crash when opening video in landscape with autofullscreen enabled
This commit is contained in:
Bnyro 2024-11-24 13:40:49 +01:00 committed by GitHub
commit a54799db32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 {