The audioClip namespace enables your app or hardware integration to play short audio clips on Sonos. You’ll have the option of specifying a custom URL or using a Sonos provided sound. The clip may be mixed with any playing content. Not all devices can implement the commands in this namespace. Devices that support the commands include the AUDIO_CLIP capability in the player object (see the group object for details).
Commands in this namespace are player targeted, by default.
Device support
The audioClip namespace is only available on players that advertise the AUDIO_CLIP capability. Before calling loadAudioClip or subscribing to audioClipStatus, verify that the target player supports the namespace.
How to check capability at runtime
- Call getGroups API
- In the response, iterate over the
playersarray. - For each player, inspect the
devices[].capabilitiesarray. If it containsAUDIO_CLIP, the player supports the namespace.
Note: Use the devices[].capabilities array on each player object.
{
"groups": [
{
"id": "RINCON_XXXXXXXXXXXXX01400:0",
"name": "Living Room",
"playerIds": ["RINCON_XXXXXXXXXXXXX01400"]
}
],
"players": [
{
"id": "RINCON_XXXXXXXXXXXXX01400",
"name": "Living Room",
"devices": [
{
"id": "RINCON_XXXXXXXXXXXXX01400",
"modelDisplayName": "Sonos One",
"capabilities": ["PLAYBACK", "CLOUD", "AUDIO_CLIP"]
}
]
},
{
"id": "RINCON_YYYYYYYYYYYYY01400",
"name": "Bedroom",
"devices": [
{
"id": "RINCON_YYYYYYYYYYYYY01400",
"modelDisplayName": "Play:1",
"capabilities": ["PLAYBACK"]
}
]
}
]
}In this example, the Living Room player supports audioClip (its capabilities array contains AUDIO_CLIP). The Bedroom player does not.
What happens if you target an unsupported player
If you call loadAudioClip on a player that does not advertise the AUDIO_CLIP capability, the request fails with ERROR_NOT_CAPABLE. Hide audioClip-dependent UI or features for players that do not report the capability.
Player compatibility overview
All Sonos players running S2 software support audioClip.
Refer to the following legacy S1-only players to identify which players do not advertise the AUDIO_CLIP capability. Use this list for reference only. Don't rely on model names. Always check the AUDIO_CLIP capability flag on each player, since new hardware and firmware updates may change support over time.
