react-native-track-player icon indicating copy to clipboard operation
react-native-track-player copied to clipboard

return added index in TrackPlayer.add

Open mynameisguy opened this issue 5 years ago • 5 comments

Pretty common flow (at least in my case) is adding a track and directly skipping to it. In v1 I knew the id so it was easy, in v2 I was hoping to get the index from the add function. I guess it was initially planned because it's described in the docs (http://react-native-track-player.js.org/documentation/#addtracks-insertbeforeindex)

I know I can get this data from the length of the queue but I still think it makes sense to get it from add function.

mynameisguy avatar Oct 07 '21 11:10 mynameisguy

Have you tried TrackPlayer.skipToNext()? I'm testing it now.

thelight413 avatar Oct 20 '21 14:10 thelight413

I'm not always adding the track to the next position in queue. I might be playing track 3/10, adding 3 more tracks and skipping directly to 11/13.

mynameisguy avatar Oct 21 '21 13:10 mynameisguy

Thanks @mynameisguy is this something you can investigate and/or create a PR for? Would love some extra help.

Thanks

bradfx avatar Jan 14 '22 11:01 bradfx

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

doublesymmetry-dev avatar Apr 16 '22 02:04 doublesymmetry-dev

This was fixed here: https://github.com/doublesymmetry/react-native-track-player/pull/1397

Thanks for reporting! I will close this issue now.

dcvz avatar Apr 16 '22 11:04 dcvz