For v1.0, the items
array has the attributes described below:
Attribute | Type | Description |
---|---|---|
itemId | string | The queue ID of the track that played. |
trackUrl | string | The URL of the track that played. |
durationPlayedMillis | number | 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 can be greater than the duration of the track. |
timeSincePlaybackMillis | number | The time, in milliseconds, since this item began playback. This value gives the music service provider a reference for when playback started. This value reports the delta between when playback began and the /timePlayed message was posted. This can be different from durationPlayedMillis due to pausing and resuming. |
Example
One or more arrays of items:
{
“items”: [
{
"kind": "musicqueue#itemPlayedData",
"itemId": "Track12345",
"trackUrl": "http://example.com/track12345.mp3",
"durationPlayedMillis": 240000,
"timeSincePlaybackMillis": 360000
}
,
{
"kind": "musicqueue#itemPlayedData",
"itemId": "Track12346",
"trackUrl": "http://example.com/track12346.mp3",
"durationPlayedMillis": 180000,
"timeSincePlaybackMillis": 600000
}
]
}