Use the cancelAudioClip
command in the audioClip
namespace to cancel a specific audio clip from playing. Sonos sends an error if it has already finished playing the selected audio clip.
Endpoint
DELETE
1 |
/players/{playerId}/audioClip/{id} |
Request parameters
This command requires a playerId
to determine the target of the command. See the Control documentation for details.
Send the following parameter in the path.
Parameter | Type | Value |
---|---|---|
id |
string | The identifier of the audio clip from the playAudioClip response. |
Response
Returns an empty object on success.
In the event of a failure, returns an ERROR_AUDIO_CLIP_ID_NOT_FOUND
error. See audioClip
for details.
Example
Request
1 |
DELETE https://api.ws.sonos.com/control/api/v1/households/{{householdId}}/players/{{playerId}}/audioClip/{id} |
Response
1 |
{} |