Open redphx opened 6 years ago
Please this is annoying
Thanks for the suggestion! We'll post here if there are any updates.
Any progress here? It's super difficult to develop anything involving queuing without this.
Same, developing with queue is impossible without this feature. Are there any plans to make this happen soon?
Hi there! :) Any progress on this?
Not the best way, but what I do is send a specific track (can be a sound effect) to the queue and keep advancing (and removing items) as fast as possible to the "next" track until I find the "id" (the end of the playing queue). Here is the Js code of my recursive function. It can give you a rough idea of a possible solution:
static clearSpotifyQueue(init) { //Recursive
let i=init;
let id="0ICWP0NnWaJUCgp6EvgNmT"; //Mission Imposible, my 'tag' track. This can also be changed so that you can send an specific id to the function.
let tId="";
if(i>=25){setLoops(); return;} //Max number of tracks in the queue that will be removed
if(i===0){ //the first time send the track to the queue
clearInterval(theLoop); //specific to my application. Stops updating the UI
$.ajax({
url: 'https://api.spotify.com/v1/me/player/queue?uri=spotify:track:'+id , method:'POST',
headers: Player.getHeaders() //replace by corresponding headers
}).done(setTimeout(function(){Queue.clearSpotifyQueue(i+1);},1000)); //adds some delay before calling the function again, otherwise it won't work
} else {
$.ajax({
url: 'https://api.spotify.com/v1/me/player', method: 'GET', headers: Player.getHeaders()
}).done(function (data) {
tId = data.item.id;
if(tId===id) {
Player.next(0); //implements a simple player/next or eliminate if you want to play the 'tag' track
setLoops(); //specific to my application...change it.
} else {
$.ajax({
url: 'https://api.spotify.com/v1/me/player/next', method:'POST', headers: Player.getHeaders()
}).done(setTimeout(function(){Queue.clearSpotifyQueue(i+1);},2000));
}
});
}
Yes i gonna do the same, enqueue a specify song (hope user does not enqueue that song before). I think the api (web and sdk) are very limited.
Dudes?
The current state of the API gives very limited control of the playback.
I want to hold and control a playlist in my application and keep the playback in sync. I tried 2 different methods to achieve this:
I would love to hear suggestions/work arounds :)
5 years later... please add support for this or at least explain why you won't
Spotify please we're starving over here
So simple of implement, but they dont care about us :P
I'm finding a way to clear all songs from queue but couldn't find it. Can we have this feature in the future? Thank you.