Can change the order of playlists?

I apologize for my poor English.
Is it possible to autoplay the tracks in a playlist in reverse order?

If you add a song by specifying the index of the most recent song as 0
Playing order is fine, but when adding a new track, you have to correct all indices of all the songs so far. (Since the latest track has an index of 0, when you edit the code, the index number is delayed by one)

Starting with the index of the oldest song at 0
Whenever I add a song, I want to make simple changes to the code. (so that you don’t have to modify all indexes)
That’s why I want to autoplay the playlist in reverse order.

Or is there another way?
Thank you.

Hi @bashil7 ,

If you are not using playlists, you can call prependSong() which will add a song at the front of the songs array. Otherwise you can do addSong() to add to the end. For playlists, you could call the addSongToPlaylist() method: and it should add it at the end.

If you want reverse order playing, you could listen to certain callbacks and set the next song to be the index of the current song -1:

Hope that helps!