@javascriptcommon/react-native-track-player 4.1.6 → 4.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1001,10 +1001,14 @@ class MusicService : HeadlessJsMediaService() {
|
|
|
1001
1001
|
override fun onDestroy() {
|
|
1002
1002
|
Timber.tag("APM").d("RNTP service is destroyed.")
|
|
1003
1003
|
if (::player.isInitialized) {
|
|
1004
|
-
|
|
1004
|
+
// moved down ->
|
|
1005
|
+
// mediaSession.release()
|
|
1005
1006
|
player.destroy()
|
|
1006
1007
|
}
|
|
1007
1008
|
|
|
1009
|
+
// -> Attempt to fix https://github.com/doublesymmetry/react-native-track-player/issues/2485
|
|
1010
|
+
mediaSession.release()
|
|
1011
|
+
|
|
1008
1012
|
instance = null
|
|
1009
1013
|
progressUpdateJob?.cancel()
|
|
1010
1014
|
super.onDestroy()
|