Describes on audio clip queued for playback on a Sonos player.
| Parameter | Type | Required | Value |
|---|
appId | string | Yes | This string identifies the app that created the audioClip. Companies should use their reversed Internet domain name as the identifier, similar to com.acme.app. |
clipType | audioClipType | No | Sonos plays a built-in sound when this option is provided. The default value is CHIME. |
errorCode | error | No | Custom error code for audio clips. See the table below for details. |
id | string | Yes | Sonos generates this unique identifier and assigned to the audio clip. |
name | string | Yes | User identifiable string. |
priority | priority | No | Clip priority. The default value is Low. |
status | audioClipState | Yes | This 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. |
| Value | Description |
|---|
ACTIVE | Currently playing |
DISMISSED | Dismissed |
DONE | Playback complete |
ERROR | Playback encountered an error |
INTERRUPTED | Playback interrupted. For example, by a high-priority audio clip |
| Error code | Description |
|---|
ERROR_AUDIO_CLIP_ID_NOT_FOUND | The 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_ERROR | The media type is not supported by Sonos. |
ERROR_AUDIO_CLIP_PAUSE_CONTENT_FAILED | The audio clip cannot be played because the server failed to pause the content when requested by the client. |