v2.0 item attributes

For v2.0, the items array has the attributes described below:

AttributeTypeDescription
idstringThe queue ID of the item that played.
mediaUrlstringURL of the item that played.
queueVersionstringThe version of the last cloud queue item window fetched by the player.
durationPlayedMillisnumberThe total duration of playback, in milliseconds. This is cumulative including any scrub or seek operations within the track during a single playback, so this value may be greater than the duration of the track.
timeSincePlaybackMillisnumberThe time in milliseconds since this track began playback. This value gives the you a reference for when playback started. This value reports the delta between when playback began and when the POST /timePlayed request was posted. This can be different from durationPlayedMillis due to pausing and resuming.
positionMillisnumberThe current playhead position at the time of the report.
positionMillisAtSegmentStartnumberThe playhead position at the start of the current segment. For example, this could contain the position where the user last paused.
typestringThe type of report. This can be final or update. You can specify the interval for players to send update reports in your GET /context responses. Players will always post final reports once after each track finishes playing or is skipped.

Note: You shouldn’t use these reports to track playback actions because players don’t post them immediately.
skipobject(Optional)

If this is present for a report type of final, it indicates that the track ended as the result of a skip. This includes a reportId string to identify the skip report.

Examples

Without a skip:

{
  "items": [
    {
      "id": "this_is_the_cloud_queue_item_id",
      "mediaUrl": "http://media.host.example.com/path/12345.mp3",
      "queueVersion" : "xyz",
      "type": "final",
      "durationPlayedMillis": 293000,
      "timeSincePlaybackMillis": 298000,
      "positionMillis": 293000,
      "positionMillisAtSegmentStart": 22300
    },
    ...
  ]
}

With a skip:

{
  "items": [
    {
      "id": "this_is_the_cloud_queue_item_id",
      "mediaUrl": "http://media.host.example.com/path/12345.mp3",
      "queueVersion": "xyz",
      "type": "final",
      "skip": {},
      "durationPlayedMillis": 293000,
      "timeSincePlaybackMillis": 298000,
      "positionMillis": 293000,
      "positionMillisAtSegmentStart": 22300
    },
    ...
  ]
}

Update:

{
  "items":[
    {
      "id":"this_is_the_cloud_queue_item_id",
      "mediaUrl":"http://media.host.example.com/path/12345.mp3",
      "queueVersion":"xyz",
      "type":"update",
      "durationPlayedMillis":31914,
      "timeSincePlaybackMillis":33742,
      "positionMillis":45000,
      "positionMillisAtSegmentStart":14000
    },
    "..."
  ]
}