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?
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
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game…