This is the multi-page printable view of this section. Click here to print.
Payloads
Payloads documentation.
1 - ClientInfo
Contains information about the client’s capabilities.
{
"name": "Play:1",
"platform": "Sonos",
"maxAudioBitrate": 512000,
"maxTranscodingAudioBitrate": 256000,
"directPlayProfiles": [
{
"container": "mp3",
"audioCodec": "mp3",
"protocol": "http",
"maxAudioChannels": 2
},
{
"container": "flac",
"audioCodec": "flac",
"protocol": "*",
"maxAudioChannels": 2
}
,
{
"container": "mp4",
"audioCodec": "flac,aac,alac",
"protocol": "*",
"maxAudioChannels": 2
}
],
"transcodingProfiles": [
{
"container": "mp3",
"audioCodec": "mp3",
"protocol": "http",
"maxAudioChannels": 2
},
{
"container": "flac",
"audioCodec": "flac",
"protocol": "*",
"maxAudioChannels": 2
}
],
"codecProfiles": [
{
"type": "AudioCodec",
"name": "mp3",
"limitations": [
{ "name": "audioBitrate", "comparison": "LessThanEqual", "value": "320000", "required": true }
]
},
{
"type": "AudioCodec",
"name": "flac",
"limitations": [
{ "name": "audioSamplerate", "comparison": "LessThanEqual", "value": "192000", "required": false },
{ "name": "audioChannels", "comparison": "LessThanEqual", "value": "2", "required": false }
]
}
]
}| Field | Type | Req. | OpenS. | Details |
|---|---|---|---|---|
name | string | Yes | Yes | The name of the client device. |
platform | string | Yes | Yes | The platform of the client (e.g., Android, iOS). |
maxAudioBitrate | integer | No | Yes | The maximum audio bitrate the client can handle. 0 or missing means no limitation. |
maxTranscodingAudioBitrate | integer | No | Yes | The maximum audio bitrate for transcoded content. 0 or missing means no limitation. |
directPlayProfiles | DirectPlayProfile[] | No | Yes | A list of profiles for direct playback. |
transcodingProfiles | TranscodingProfile[] | No | Yes | A list of profiles for transcoding. The server should evaluate these in the order they are listed, as a priority list. |
codecProfiles | CodecProfile[] | No | Yes | A list of codec-specific profiles. |
2 - CodecProfile
Defines a codec profile with optional limitations.
{
"type": "AudioCodec",
"name": "mp3",
"limitations": [
{ "name": "audioBitrate", "comparison": "LessThanEqual", "value": "320000", "required": true }
]
}| Field | Type | Req. | OpenS. | Details |
|---|---|---|---|---|
type | string | Yes | Yes | The type of codec profile. Currently only AudioCodec is supported. |
name | string | Yes | Yes | The name of the codec (e.g., mp3, flac). Only a single value is accepted. |
limitations | Limitation[] | No | Yes | A list of limitations for this codec. |
3 - DirectPlayProfile
Defines a direct play profile.
{
"container": "mp3",
"audioCodec": "mp3",
"protocol": "http",
"maxAudioChannels": 2
}| Field | Type | Req. | OpenS. | Details |
|---|---|---|---|---|
container | string | Yes | Yes | Comma-separated list of supported container format (e.g., mp3, flac, mp4) or * to not limit to a specific container. |
audioCodec | string | Yes | Yes | Comma-separated list of supported audio codecs or * to not limit to specific codecs. |
protocol | string | Yes | Yes | The streaming protocol. Can be http, hls or *. |
maxAudioChannels | integer | No | Yes | The maximum number of audio channels supported. |
4 - Limitation
Defines a limitation for a codec profile.
{
"name": "audioBitrate",
"comparison": "LessThanEqual",
"value": "320000",
"required": true
}| Field | Type | Req. | OpenS. | Details |
|---|---|---|---|---|
name | string | Yes | The name of the limitation. Can be audioChannels, audioBitrate, audioProfile, audioSamplerate, or audioBitdepth. | |
comparison | string | Yes | The comparison operator. Can be Equals, NotEquals, LessThanEqual, GreaterThanEqual, EqualsAny, or NotEqualsAny. | |
value | string | Yes | The value to compare against. For EqualsAny and NotEqualsAny, this should be a pipe-separated (|) list of values (e.g., 44100|48000). | |
required | boolean | Yes | Whether this limitation must be met. |
5 - TranscodingProfile
Defines a transcoding profile.
{
"container": "mp3",
"audioCodec": "mp3",
"protocol": "http",
"maxAudioChannels": 2
}| Field | Type | Req. | OpenS. | Details |
|---|---|---|---|---|
container | string | Yes | Yes | The container format (e.g., mp3, flac). Only a single explicit value is accepted (No *). |
audioCodec | string | Yes | Yes | The target audio codec for transcoding. Only a single explicit value is accepted (No *). |
protocol | string | Yes | Yes | The streaming protocol. Can be http or hls. Only a single explicit value is accepted (No *). |
maxAudioChannels | integer | No | Yes | The maximum number of audio channels for the transcoded stream. |