Announcements

Help Wizard

Step 1

NEXT STEP

Determining if Spotify Playback SDK is streaming regardless of User's toggling

Determining if Spotify Playback SDK is streaming regardless of User's toggling

When the network connection is poor, the playback pauses. With Spotify Webplayback SDK's 'player_state_changed' event, you can't determine if this happened. In this event, it only fires and returns state.paused = false when user intentionally paused the song. If the stream is paused because of a network problem, this event isn't get fired.

 

Is there any way to tell if network slowdown or failure caused the pausing of the track?

Reply
1 Reply

I haven't had the problem, so I couldn't try it, but it looks like this would be for you:

https://developer.spotify.com/documentation/web-playback-sdk/reference/#event-not-ready

It even says it happens when you loose internet connection

 

If this does not work you can also try

https://developer.spotify.com/documentation/web-playback-sdk/reference/#error-playback-error

Suggested posts