fix: crash when starting video upon auto fullscreen

This commit is contained in:
Bnyro 2023-09-29 11:26:29 +02:00
parent 5f50c8104a
commit ac5bf43846

View File

@ -1331,6 +1331,10 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
}
private fun updateResolutionOnFullscreenChange(isFullscreen: Boolean) {
// this occurs when the user has the phone in landscape mode and it thus rotates when
// opening a new video
if (!this::trackSelector.isInitialized) return
if (!isFullscreen && noFullscreenResolution != null) {
setPlayerResolution(noFullscreenResolution!!)
} else {