Reputation: 11
I'm new to the Spotify SDK.
I just implemented auth
, login
and getting some track URIs. That works.
However I can't find reset or clear music queue that is currently playing.
I think [SPTAudioStreamingController queueURIs: clearQueue: callback:];
is what I need.
However on my environment with SDK beta6 and iOS8, it just adds tracks to the end of the queue and never clears the current queue.
//Reset current queue and replace it with new URIs?
[self.player queueURIs:uris clearQueue:YES callback:nil];
Am I missing something?
Upvotes: 1
Views: 996
Reputation: 951
You can simply use another function, which replaces all playing tracks with the given.
[self.player replaceURIs:tracks withCurrentTrack:0 callback:^(NSError *error) {
if(error){
NSLog(@"*** Error occurred while trying replace playing track %@", error);
return;
}
}];
Upvotes: 0