mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 08:20:32 +05:30
fix: auto fullscreen causes player layout issues
This commit is contained in:
parent
278ba4ea32
commit
9f69770b39
@ -368,8 +368,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
keepQueue = playerData.keepQueue
|
keepQueue = playerData.keepQueue
|
||||||
timeStamp = playerData.timestamp
|
timeStamp = playerData.timestamp
|
||||||
|
|
||||||
playerLayoutOrientation = resources.configuration.orientation
|
|
||||||
|
|
||||||
// broadcast receiver for PiP actions
|
// broadcast receiver for PiP actions
|
||||||
ContextCompat.registerReceiver(
|
ContextCompat.registerReceiver(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
@ -403,9 +401,16 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
|
|
||||||
changeOrientationMode()
|
changeOrientationMode()
|
||||||
|
|
||||||
|
playerLayoutOrientation = resources.configuration.orientation
|
||||||
|
|
||||||
createExoPlayer()
|
createExoPlayer()
|
||||||
initializeTransitionLayout()
|
initializeTransitionLayout()
|
||||||
initializeOnClickActions()
|
initializeOnClickActions()
|
||||||
|
|
||||||
|
if (PlayerHelper.autoFullscreenEnabled && resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
|
||||||
|
setFullscreen()
|
||||||
|
}
|
||||||
|
|
||||||
playVideo()
|
playVideo()
|
||||||
|
|
||||||
showBottomBar()
|
showBottomBar()
|
||||||
@ -1633,9 +1638,9 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
// exit fullscreen if not landscape
|
// exit fullscreen if not landscape
|
||||||
else -> unsetFullscreen()
|
else -> unsetFullscreen()
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
restartActivityIfNeeded()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restartActivityIfNeeded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun disableController() {
|
private fun disableController() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user