setVolume
Use the setVolume command to set the group volume and the group's mute state. The group is automatically unmuted unless otherwise specified.
When your app sets the group volume, the group coordinator calculates the required changes to the volume level for each player in the group so that the result is the average volume level of the group as a whole. The group coordinator then adjusts its local volume and initiates network transactions with the other players in the group to adjust their volumes accordingly. While players adjust their volumes, the group coordinator may generate one or more groupVolume events.
Since this command can generate additional network transactions and events, your app should optimize how often it is invoked to maintain a good user experience without flooding the network, such as when implementing a touch screen volume slider that controls a group of five players.
If every player in the group has a fixed player volume state that is true, the group volume cannot be changed, so the command will fail and you will receive an ERROR_COMMAND_FAILED globalError. The groupVolume event reports this case with a fixed value of true.
Request
- Base URLhttps://api.ws.sonos.com/control/api/v1
- URLhttps://api.ws.sonos.com/control/api/v1/groups/{groupId}/groupVolume
- AuthOAuth 2 and HTTP bearer and API key in header X-Sonos-Api-KeyAuthorization code: https://api.sonos.com/login/v3/oauthToken URL: https://api.sonos.com/login/v3/oauth/access scopes: playback-control-all
Request body
Response
See the x-muse-error-codes extension for a list of muse errors that generate this response
This object represents an empty (default) success. The platform returns an empty object ({}).
Changes
No recorded changes to this operation across all 1 revision of this API.