audioClip

Describes on audio clip queued for playback on a Sonos player.

Parameters

ParameterTypeRequiredValue
appIdstringYesThis string identifies the app that created the audioClip. Companies should use their reversed Internet domain name as the identifier, similar to com.acme.app.
clipTypeaudioClipTypeNoSonos plays a built-in sound when this option is provided. The default value is CHIME.
errorCodeerrorNoCustom error code for audio clips. See the table below for details.
idstringYesSonos generates this unique identifier and assigned to the audio clip.
namestringYesUser identifiable string.
prioritypriorityNoClip priority. The default value is Low.
statusaudioClipStateYesThis field indicates the state of the audio clip, for example, if it’s active, it’s currently playing. Audio clips transition from pending (on load) to active to done. Sonos returns the state only in events. See the table below for the available states and values.

audioClipState string enum type parameters

ValueDescription
ACTIVECurrently playing
DISMISSEDDismissed
DONEPlayback complete
ERRORPlayback encountered an error
INTERRUPTEDPlayback interrupted. For example, by a high-priority audio clip

Custom error codes

Error codeDescription
ERROR_AUDIO_CLIP_ID_NOT_FOUNDThe specified audio clip id was not recognized by the player. This may be because the player purged it from memory. Players purge audio clips from memory after playing them.
ERROR_AUDIO_CLIP_MEDIA_ERRORThe media type is not supported by Sonos.
ERROR_AUDIO_CLIP_PAUSE_CONTENT_FAILEDThe audio clip cannot be played because the server failed to pause the content when requested by the client.