Send "stop playback" to Sonos Controller

258 Views Asked by At

I have a Programmed Radio service and I want to implement a method that sends a "stop/pause playback" message to Sonos whenever the same user starts playing with our mobile app or web streaming. I noticed Spotify has that functionality implemented but I don't see any documentation on how to do it in the API Reference.

1

There are 1 best solutions below

0
On

You can use the Client.DeviceLimit faultcode to stop playback on a Sonos device. When the player receives the Client.DeviceLimit fault, a default error message will be shown on the controller, however, playback of the currently playing track will continue depending on how much of said track has been buffered by the player. When the player attempts to fetch the rest of the track data, or the next track (depending on where you are in the file), playback will cease.

Please see the following page on Sonos Labs for more information on Standard error handling: http://musicpartners.sonos.com/node/110