diff --git a/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt b/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt index cfde71f5..1593b78f 100644 --- a/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt +++ b/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt @@ -132,7 +132,6 @@ class RNPlayerView( } override fun onStop(owner: LifecycleOwner) { - playerInMediaSessionService = null removePlayerForBackgroundPlayback() playerView?.onStop() } @@ -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