@javascriptcommon/react-native-track-player 4.1.22 → 4.1.23

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.
@@ -215,8 +215,8 @@ public class AudioPlayer: AVPlayerWrapperDelegate {
215
215
  // the loadNowPlayingMetaValues call straight after:
216
216
  nowPlayingInfoController.setWithoutUpdate(keyValues: [
217
217
  MediaItemProperty.duration(item.getDuration()),
218
- NowPlayingInfoProperty.playbackRate(nil),
219
- NowPlayingInfoProperty.elapsedPlaybackTime(nil)
218
+ NowPlayingInfoProperty.playbackRate(0.0),
219
+ NowPlayingInfoProperty.elapsedPlaybackTime(0.0)
220
220
  ])
221
221
  loadNowPlayingMetaValues()
222
222
  }
@@ -398,7 +398,9 @@ public class AudioPlayer: AVPlayerWrapperDelegate {
398
398
  }
399
399
 
400
400
  switch state {
401
- case .ready, .loading, .playing, .paused:
401
+ case .ready, .playing, .paused:
402
+ // Only update on ready/playing/paused, not on loading (removed .loading)
403
+ // This prevents showing incorrect progress during item transitions
402
404
  if (automaticallyUpdateNowPlayingInfo) {
403
405
  updateNowPlayingPlaybackValues()
404
406
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@javascriptcommon/react-native-track-player",
3
- "version": "4.1.22",
3
+ "version": "4.1.23",
4
4
  "description": "A fully fledged audio module created for music apps",
5
5
  "main": "lib/src/index.js",
6
6
  "types": "lib/src/index.d.ts",