mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 06:40:30 +05:30
fix: retain exoplayer on orientation change (#6428)
This commit is contained in:
parent
8bd684038c
commit
5bd6cc7c44
@ -845,12 +845,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
viewModel.player.removeListener(playerListener)
|
viewModel.player.removeListener(playerListener)
|
||||||
viewModel.player.pause()
|
viewModel.player.pause()
|
||||||
|
|
||||||
runCatching {
|
|
||||||
if (!viewModel.isOrientationChangeInProgress) {
|
|
||||||
viewModel.player.stop()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PlayerHelper.pipEnabled) {
|
if (PlayerHelper.pipEnabled) {
|
||||||
// disable the auto PiP mode for SDK >= 32
|
// disable the auto PiP mode for SDK >= 32
|
||||||
PictureInPictureCompat
|
PictureInPictureCompat
|
||||||
@ -1347,11 +1341,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createExoPlayer() {
|
private fun createExoPlayer() {
|
||||||
// viewModel.keepOrCreatePlayer(requireContext()).let { (player, trackSelector) ->
|
|
||||||
// localViewModel.player = player
|
|
||||||
// localViewModel.trackSelector = trackSelector
|
|
||||||
// }
|
|
||||||
|
|
||||||
viewModel.player.setWakeMode(C.WAKE_MODE_NETWORK)
|
viewModel.player.setWakeMode(C.WAKE_MODE_NETWORK)
|
||||||
viewModel.player.addListener(playerListener)
|
viewModel.player.addListener(playerListener)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user