This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Payloads

Payloads documentation.

1 - ClientInfo

Contains information about the client’s capabilities.
{
  "name": "Play:1",
  "platform": "Sonos",
  "maxAudioBitrate": 512000,
  "maxTranscodingAudioBitrate": 256000,
  "directPlayProfiles": [
    {
      "containers": [ "mp3" ],
      "audioCodecs": [ "mp3" ],
      "protocols": [ "http" ],
      "maxAudioChannels": 2
    },
    {
      "containers": [ "flac" ],
      "audioCodecs": [ "flac" ],
      "protocols": [],
      "maxAudioChannels": 2
    }
    ,
    {
      "containers": [ "mp4" ],
      "audioCodecs": [ "flac", "aac", "alac" ],
      "protocols": [],
      "maxAudioChannels": 2
    }
    ],
    "transcodingProfiles": [
    {
      "containers": "mp3",
      "audioCodecs": "mp3",
      "protocols": "http",
      "maxAudioChannels": 2
    },
    {
      "containers": "flac",
      "audioCodecs": "flac",
      "protocols": "*",
      "maxAudioChannels": 2
    }
  ],
  "codecProfiles": [
    {
      "type": "AudioCodec",
      "name": "mp3",
      "limitations": [
        { "name": "audioBitrate", "comparison": "LessThanEqual", "values": [ "320000" ], "required": true }
      ]
    },
    {
      "type": "AudioCodec",
      "name": "flac",
      "limitations": [
        { "name": "audioSamplerate", "comparison": "LessThanEqual", "values":  [ "192000" ], "required": false },
        { "name": "audioChannels",  "comparison": "Equals", "values": ["1", "2" ],      "required": false }
      ]
    }
  ]
}
FieldTypeReq.OpenS.Details
namestringYesYesThe name of the client device.
platformstringYesYesThe platform of the client (e.g., Android, iOS).
maxAudioBitrateintegerNoYesThe maximum audio bitrate the client can handle. 0 or missing means no limitation.
maxTranscodingAudioBitrateintegerNoYesThe maximum audio bitrate for transcoded content. 0 or missing means no limitation.
directPlayProfilesDirectPlayProfile[]NoYesA list of profiles for direct playback.
transcodingProfilesTranscodingProfile[]NoYesA list of profiles for transcoding. The server should evaluate these in the order they are listed, as a priority list.
codecProfilesCodecProfile[]NoYesA 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 }
  ]
}
FieldTypeReq.OpenS.Details
typestringYesYesThe type of codec profile. Currently only AudioCodec is supported.
namestringYesYesThe name of the codec (e.g., mp3, flac). Only a single value is accepted.
limitationsLimitation[]NoYesA list of limitations for this codec.

3 - DirectPlayProfile

Defines a direct play profile.
{
  "containers": [ "mp4" ],
  "audioCodecs": [ "aac", "alac" ],
  "protocols": [ "http" ],
  "maxAudioChannels": 2
}
FieldTypeReq.OpenS.Details
containersArray of stringYesYesList of supported container format (e.g., mp3, flac, mp4). An empty array means any container.
audioCodecsArray of stringYesYesList of supported audio codecs. An empty array means any codec.
protocolsArray of stringYesYesThe streaming protocols. Supported values are http, hls.
maxAudioChannelsintegerNoYesThe maximum number of audio channels supported.

4 - Limitation

Defines a limitation for a codec profile.
{
  "name": "audioSamplerate",
  "comparison": "Equals",
  "values": [ "44100", "48000" ],
  "required": true
}
FieldTypeReq.OpenS.Details
namestringYesThe name of the limitation. Can be audioChannels, audioBitrate, audioProfile, audioSamplerate, or audioBitdepth.
comparisonstringYesThe comparison operator. Can be Equals, NotEquals, LessThanEqual, GreaterThanEqual.
valuesstringYesThe values to compare against. For LessThanEqual and GreaterThanEqual, only the first value will be used.
requiredbooleanYesWhether this limitation must be met.

5 - TranscodingProfile

Defines a transcoding profile.
{
  "container": "mp3",
  "audioCodec": "mp3",
  "protocol": "http",
  "maxAudioChannels": 2
}
FieldTypeReq.OpenS.Details
containerstringYesYesThe container format (e.g., mp3, flac).
audioCodecstringYesYesThe target audio codec for transcoding.
protocolstringYesYesThe streaming protocol. Can be http or hls.
maxAudioChannelsintegerNoYesThe maximum number of audio channels for the transcoded stream.