How can I add a track to the current play queue in a Spotify app?
You need to create an unnamed playlist to create your own play queue.
function playTracks(tracks, index) {
var pl = new models.Playlist();
for (var i = 0; i < tracks.length; ++i) {
pl.add(tracks[i]);
}
models.player.play(pl.uri, pl.uri, index);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With