Skip to content

Commit

Permalink
Move statement inside block
Browse files Browse the repository at this point in the history
  • Loading branch information
123mpozzi committed Nov 6, 2024
1 parent 2f09d63 commit e22981e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ class RNPlayerView(
}

override fun onStop(owner: LifecycleOwner) {
playerInMediaSessionService = null
removePlayerForBackgroundPlayback()
playerView?.onStop()
}
Expand All @@ -142,6 +141,7 @@ class RNPlayerView(
// When background playback is enabled,
// remove player from view so it does not get paused when entering background
private fun removePlayerForBackgroundPlayback() {
playerInMediaSessionService = null
playerView?.player?.let {
if (!enableBackgroundPlayback) {
return
Expand Down

0 comments on commit e22981e

Please sign in to comment.