ios-sdk icon indicating copy to clipboard operation
ios-sdk copied to clipboard

Why does playing 1 song trigger the radio next, even when asRadio = false?

Open stephaniegoldman12 opened this issue 6 years ago • 9 comments

appRemote?.playerAPI?.play(identifier, asRadio: false, callback: defaultCallback).

Without including the asRadio part, it does the same thing.

I just want it to play 1 track and stop entirely.

stephaniegoldman12 avatar Feb 18 '20 03:02 stephaniegoldman12

Trying to accomplish something similar, another attempt to enqueue multiple songs leads to this error as well: AppRemote: Received error: Error Domain=com.spotify.app-remote.wamp-client Code=-3000 "(null)" UserInfo={error-identifier=error.request_execution_failed, message-type=8} to request: <SPTAppRemoteCallRequest: 0x282d66070; id: 5, method: com.spotify.queue_spotify_uri>

stephaniegoldman12 avatar Feb 18 '20 08:02 stephaniegoldman12

That's because the Autoplay option in Settings -> Playback in the Spotify app is enabled. That's the default and that should be up to the user to decide if they want it or not.

kkarayannis avatar Feb 18 '20 13:02 kkarayannis

Ok thanks! Sorry, there was another question too. How do you enqueue multiple songs? If I try to call the function more than once in a for loop with uri's, I get this message:

AppRemote: Received error: Error Domain=com.spotify.app-remote.wamp-client Code=-3000 "(null)" UserInfo={error-identifier=error.request_execution_failed, message-type=8} to request: <SPTAppRemoteCallRequest: 0x282d66070; id: 5, method: com.spotify.queue_spotify_uri>

It only let's me enqueue one song, and then I get the above message ^

stephaniegoldman12 avatar Feb 18 '20 16:02 stephaniegoldman12

We are getting the same error and haven't heard a response for some time now. I think it happens when you call app remote methods too quickly.

rolflocher avatar Feb 18 '20 20:02 rolflocher

Thank you @rolflocher...dang. I hoped there was another way around it. Did you find a solution?

stephaniegoldman12 avatar Feb 18 '20 21:02 stephaniegoldman12

@kkarayannis is there any way to keep selected songs playing when the phone is locked if you can't add more than one song to the queue at a time?

stephaniegoldman12 avatar Feb 18 '20 21:02 stephaniegoldman12

@stephaniegoldman12 you could try waiting for the completion handler before enqueuing the next song.

rolflocher avatar Feb 18 '20 22:02 rolflocher

#200

rolflocher avatar May 13 '20 02:05 rolflocher