CocoalibSpotify how to monitor playback rate change due to network lost

73 views Asked by At

I'm using cocoalibspotify and I'm trying to monitor the playback stop/pause due to temporary network lost. In that case the spotify will stop playing. I tried to observe "playbackManager.isPlaying" key change, but it only changes when i manually change it or the track is finished, didn't catch any playback stop due to network connection. Thank you for your help in advance!

1

There are 1 answers

0
wao813 On

After play around with the spotify sdk a bit, I found the callback function in SPSessionPlaybackDelegate: -(void)session:(SPSession *)aSession didEncounterNetworkError:(NSError *)error; That would do the trick.