spotify / ios-sdk

Spotify SDK for iOS
https://developer.spotify.com/documentation/ios/
643 stars 188 forks source link

Concurrent audio causes disconnect #238

Open jseidman95 opened 4 years ago

jseidman95 commented 4 years ago

When I play audio from another source (while the app remote is playing music) the app remote disconnects with the following error: AppRemote: Disconnected with error: Error Domain=com.spotify.app-remote.transport Code=-2001 "End of stream." UserInfo={NSLocalizedRecoverySuggestion=Reconnect to the Spotify app., NSLocalizedDescription=End of stream., NSLocalizedFailureReason=One of the streams has reached the end.}

I am using .mixWithOthers in the audio session so I can't figure out why this error would be occuring.

kkarayannis commented 4 years ago

If Spotify stops playing music then the AppRemote connection is disconnected.

jseidman95 commented 4 years ago

@kkarayannis I'm not stopping playback in spotify, the music is playing and audio plays from another source and the app remote disconnects on its own

yulingchen08 commented 2 years ago

@kkarayannis Hi, I encounter the same issue. I play another audio from my app when the AppRemote is playing music, the AppRemote will disconnect immediately with the error message "End of stream". Any suggestion to fix this issue? Thank you.