mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Fix setFullScree()
call when in PiP mode
When activity is in PiP mode it gives orientation as landscape, which leads to unwanted `setFullscreen()`.
This commit is contained in:
parent
15e16fcae6
commit
f8676682bf
@ -1411,6 +1411,10 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
|
||||
if (!PlayerHelper.autoRotationEnabled) return
|
||||
|
||||
// If in PiP mode, orientation is given as landscape.
|
||||
if (SDK_INT >= Build.VERSION_CODES.N && activity?.isInPictureInPictureMode == true) return
|
||||
|
||||
when (newConfig.orientation) {
|
||||
// go to fullscreen mode
|
||||
Configuration.ORIENTATION_LANDSCAPE -> setFullscreen()
|
||||
|
Loading…
Reference in New Issue
Block a user