v2.2 item attributes

For v2.2, the items array includes the additional attributes below

AttributeTypeDescription
actionsarray

Replaces skip from v2.0.

(Optional) Indicates the user action, which may contain: play, seek, skip, skipBack, or pause.

The player uses this for skip or pause.
If skip is present for a report type of final, it indicates that the track ended as the result of a skip.
If pause is present for a final or update report, it indicates that the track was paused by the user.

Note: Different strategies are required depending on the implementation method:

  1. For a Cloud Queue-based implementation (e.g., program radio), sendPlaybackActions should be set as true in the preceding Context response.

  2. For an SMAPI-based implementation, sendPlaybackActions can be set as true directly in the response to the timePlayed request.



Examples

Update event when sendPlaybackActions reporting option is set to true and the user pauses playback:

{
  "items":[
    {
      "id":"this_is_the_cloud_queue_item_id",
      "mediaUrl":"http://media.host.example.com/path/12345.mp3",
      "queueVersion":"xyz",
      "type":"update",
      "positionMillis":4211,
      "positionMillisAtSegmentStart":3461,
      "actions":[
        {
          "pause":[
            {
              "positionMillis":4211
            }
          ]
        }
      ],
      "durationPlayedMillis":4000,
      "timeSincePlaybackMillis":5250
    },
    "..."
  ]
}

Final event when sendPlaybackActions reporting option is set to true and the user skips a track:

{
  "items":[
    {
      "id":"this_is_the_cloud_queue_item_id",
      "mediaUrl":"http://media.host.example.com/path/12345.mp3",
      "queueVersion":"xyz",
      "contextVersion":"abc",
      "type":"final",
      "positionMillis":500,
      "positionMillisAtSegmentStart":0,
      "actions":[
        {
          "skip":[
            {
              "positionMillis":500
            }
          ]
        }
      ],
      "durationPlayedMillis":500,
      "timeSincePlaybackMillis":1250
    }
  ]
}