Skip to content

Commit

Permalink
fix: retain exoplayer on orientation change (#6428)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pittvandewitt authored Sep 5, 2024
1 parent 8bd6840 commit 5bd6cc7
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -845,12 +845,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
viewModel.player.removeListener(playerListener)
viewModel.player.pause()

runCatching {
if (!viewModel.isOrientationChangeInProgress) {
viewModel.player.stop()
}
}

if (PlayerHelper.pipEnabled) {
// disable the auto PiP mode for SDK >= 32
PictureInPictureCompat
Expand Down Expand Up @@ -1347,11 +1341,6 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
}

private fun createExoPlayer() {
// viewModel.keepOrCreatePlayer(requireContext()).let { (player, trackSelector) ->
// localViewModel.player = player
// localViewModel.trackSelector = trackSelector
// }

viewModel.player.setWakeMode(C.WAKE_MODE_NETWORK)
viewModel.player.addListener(playerListener)

Expand Down

0 comments on commit 5bd6cc7

Please sign in to comment.