@javascriptcommon/react-native-track-player 4.1.21 → 4.1.22
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.
|
@@ -696,9 +696,12 @@ abstract class AudioPlayer internal constructor(
|
|
|
696
696
|
Player.MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED -> playerEventHolder.updateAudioItemTransition(
|
|
697
697
|
AudioItemTransitionReason.QUEUE_CHANGED(oldPosition)
|
|
698
698
|
)
|
|
699
|
-
Player.MEDIA_ITEM_TRANSITION_REASON_REPEAT ->
|
|
700
|
-
|
|
701
|
-
|
|
699
|
+
Player.MEDIA_ITEM_TRANSITION_REASON_REPEAT -> {
|
|
700
|
+
// Seek to 0 to update MediaSession position when track loops
|
|
701
|
+
// This fixes the notification progress bar not resetting on loop
|
|
702
|
+
exoPlayer.seekTo(0)
|
|
703
|
+
playerEventHolder.updateAudioItemTransition(AudioItemTransitionReason.REPEAT(oldPosition))
|
|
704
|
+
}
|
|
702
705
|
Player.MEDIA_ITEM_TRANSITION_REASON_SEEK -> playerEventHolder.updateAudioItemTransition(
|
|
703
706
|
AudioItemTransitionReason.SEEK_TO_ANOTHER_AUDIO_ITEM(oldPosition)
|
|
704
707
|
)
|
package/package.json
CHANGED