metadataStatus

The metadataStatus event in the playbackMetadata namespace indicates changes to the metadata for the currently playing track and the next track, if available.


Parameters

See the Control documentation for descriptions of parameters in the header. See the table below for descriptions of parameters in the body.

ParameterTypeRequiredValue
containercontainerYesA container object indicating the current playback source. The container describes and identifies what is currently playing, for example, the programmed radio station, music service playlist, or linein source. If no content is loaded, the container field will not be present.
currentItemitemYesA playback object for the current item. See the item playback object for the data structure of this object.
nextItemitemYesA playback object for the item that will play after the currently playing track finishes. See the item playback object for the data structure of this object. Only included if there is a next track.
streamInfostringNoAn unstructured text string describing what is currently playing. Typically only available for stations that do not have currentItem information.

Example

Here’s an example with tags in the container indicating explicit content:


  {
    "container": {
      "name": "Malibu",
      "type": "album",
      "id": {
        "serviceId": "000",
        "objectId": "0000000album:0000000000",
        "accountId": "aa_000"
      },
      "service": {
        "name": "ACME Music"
      },
      "imageUrl": "http://acme.example.com/image/ab/abcd-123/400x400bb.jpeg",
      "tags": [
        "TAG_EXPLICIT"
      ]
    },
    "currentItem": {
      "track": {
        "type": "track",
        "name": "Come Down",
        "imageUrl": "http://000.000.00.00:1400/getaa?s=1&u=x-sonos-http%3asong%253a1065680000.mp4%3fsid%3d204%26flags%3d73760%26sn%3d241",
        "album": {
          "name": "Malibu"
        },
        "artist": {
          "name": "Anderson .Paak"
        },
        "id": {
          "serviceId": "000",
          "objectId": "song:1065681770",
          "accountId": "aa_000"
        },
        "service": {
          "name": "ACME Music"
        },
        "durationMillis": 176000,
        "tags": [
          "TAG_EXPLICIT"
        ]
      }
    },
    "nextItem": {
      "track": {
        "type": "track",
        "name": "Silicon Valley",
        "imageUrl": "http://000.000.00.00:1400/getaa?s=1&u=x-sonos-http%3asong%253a1065680000.mp4%3fsid%3d204%26flags%3d73760%26sn%3d241",
        "album": {
          "name": "Malibu"
        },
        "artist": {
          "name": "Anderson .Paak"
        },
        "id": {
          "serviceId": "204",
          "objectId": "song:1065681771",
          "accountId": "aa_000"
        },
        "service": {
          "name": "ACME Music"
        },
        "durationMillis": 244000,
        "tags": [
          "TAG_EXPLICIT"
        ]
      }
    }
  }

Sonos speakers that send TV audio, such as the Sonos Beam, send a name key value of “TV Audio” when the type is linein.homeTheater:

{
  "container": {
    "name": "TV Audio",
    "type": "linein.homeTheater"
  }
}