Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a song to the current play queue in a Spotify App

How can I add a track to the current play queue in a Spotify app?

like image 731
user507410 Avatar asked Dec 24 '11 09:12

user507410


Video Answer


1 Answers

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);
}
like image 195
msfeldstein Avatar answered Sep 20 '22 02:09

msfeldstein