Describe the Bug
When you TrackPlayer.stop() you can not restart the track with TrackPlayer.play().
I usually stop live streams so they pick up at the current time when they restart. However, I noticed the same problem even when stopping non-live tracks.
Steps To Reproduce
- Play a track
- Stop it TrackPlayer.stop()
- Play it again: TrackPlayer.play()
Nothing happens.
Reproduction
TrackPlayer.setMediaItems([
{
mediaId: 'track-1',
url: 'https://example.com/audio.mp3',
title: 'My Track',
artist: 'Artist Name',
artworkUrl: 'https://example.com/artwork.jpg',
},
]);
TrackPlayer.play();
// sometime later
TrackPlayer.stop();
// sometime later
TrackPlayer.play();
Environment Info:
- Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: Linux 7.1 CachyOS Linux
CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P
Memory: 18.75 GB / 29.08 GB
Shell:
version: 4.8.1
path: /bin/fish
Binaries:
Node:
version: 24.18.1
path: /usr/bin/node
Yarn:
version: 1.22.22
path: /usr/bin/yarn
npm:
version: 12.0.2
path: /usr/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: AI-261.26222.65.2613.16025427
Languages:
Java:
version: 21.0.12
path: /usr/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli":
installed: 20.1.0
wanted: 20.1.0
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.86.2
wanted: 0.86.2
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false
info React Native v0.87.0 is now available (your project is running on v0.86.2).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.87.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.86.2&to=0.87.0
info For more info, check out "https://reactnative.dev/docs/upgrading?os=linux".
-
@rntp/player version
5.8.0
-
Real device or simulator
both
-
iOS / Android version
Android 16
How I can Help
What can you do to help resolve this?
Restore previous behavior or add some way to reload a track in place.
Have you investigated the underlying issue?
No
Describe the Bug
When you TrackPlayer.stop() you can not restart the track with TrackPlayer.play().
I usually stop live streams so they pick up at the current time when they restart. However, I noticed the same problem even when stopping non-live tracks.
Steps To Reproduce
Nothing happens.
Reproduction
Environment Info:
npx react-native info@rntp/playerversion5.8.0
Real device or simulator
both
iOS / Android version
Android 16
How I can Help
What can you do to help resolve this?
Restore previous behavior or add some way to reload a track in place.
Have you investigated the underlying issue?
No