Can't add more than 1 tract in react native track player
I am developing a music player app with React Native Expo & to play music using the library react-native-track-player
I am having issues with adding more than 1 track if I add just a single track with this code working fine
await TrackPlayer.add([selectedTrack])
but when try to add multiple tracks(array of tracks), getting issue
code
await TrackPlayer.add(tracks)
error
[Error: url: The URL cannot be empty]
even I try
await TrackPlayer.setQueue(tracks)
but same error
getting data with REST API & checked there is mp3 URL at evey url key
I tried to much but didn't figure out issue
package json
"@react-navigation/native": "^6.0.2",
"expo": "~51.0.28",
"expo-router": "~3.5.23",
"react-native-track-player": "^4.1.1",
Thanks in advance for help
check ur URL again..?
also dont skip the issue template
check ur URL again..?
also dont skip the issue template
@lovegaoshi yes I check the URL & with same data add single track working fine, & pls explain what do you mean by also dont skip the issue template
the part u deleted when u made this issue
see what the example app did. i dont want to read ur code even if u posted ur repo, but without a repo all anyone can guess is directly from the error log, which is u didnt put an url in one of the track elements. i have to trust the computer between u and the computer.
On Wed, Sep 18, 2024, 5:14 AM Dinesh Chauhan @.***> wrote:
check ur URL again..?
also dont skip the issue template
@lovegaoshi https://github.com/lovegaoshi yes I check the URL & with same data add single track working fine, & pls explain what do you mean by also dont skip the issue template
— Reply to this email directly, view it on GitHub https://github.com/doublesymmetry/react-native-track-player/issues/2371#issuecomment-2358305864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZMOVVSOPZDFBAHRN3D4OBDZXFVCBAVCNFSM6AAAAABOHVCADOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJYGMYDKOBWGQ . You are receiving this because you were mentioned.Message ID: @.*** com>
please fill in the issue template correctly