doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.32k stars 1.02k forks source link

fix(web): playlist queue logic #2291

Closed Bram-dc closed 7 months ago

Bram-dc commented 8 months ago

There were at least 2 bugs that occured in my project using react-native-web:

  1. Adding new songs to the end would instead insert them at index 1. This is because in an earlier function you would set an undefined parameter to -1, after evaluating if this value is set you forgot to also check for -1

  2. The next song would not play if the repeat mode is set to Queue because it would never get to the logic if it should play the next song.

This PR should fix the issues. :)

Bram-dc commented 7 months ago

Done!