You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the settings of my app, I will like to offer the user the option to stop the player when a track completes.
But react-native-track-player always plays the next track in the queue. This behaviour seems hardcoded. I don't see any event or hook to change this.
Calling TrackPlayer.pause() in the Event.PlaybackTrackChanged handler would have the effect to also pause when the user press NEXT button, which I obviously don't want . I guess I could use a global value with useRef, but I hope there is a nicer solution.
And of course, I would like to avoid implementing my own queue externally (with only one track in react-native-track-player queue).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In the settings of my app, I will like to offer the user the option to stop the player when a track completes.
But react-native-track-player always plays the next track in the queue. This behaviour seems hardcoded. I don't see any event or hook to change this.
Calling TrackPlayer.pause() in the Event.PlaybackTrackChanged handler would have the effect to also pause when the user press NEXT button, which I obviously don't want . I guess I could use a global value with useRef, but I hope there is a nicer solution.
And of course, I would like to avoid implementing my own queue externally (with only one track in react-native-track-player queue).
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions