When fetching a user's currently playing track, the following value is expected in the response (pulled from API documentation):
timestamp | integer | Unix Millisecond Timestamp when data was fetched
Based on my observations, though, timestamp doesn't represent when the data was fetched. It instead represents when the user started playback of the current song.
As of right now, the only way for an application to know current track progress to millisecond accuracy is to derive the value using Date.now() - timestamp. However, if a user manually seeks within a track this becomes impossible.
Endpoint(s):
Scope(s):
Steps to reproduce:
• With a track playing, ping the endpoint multiple consecutive times. Observe that progress_ms updates properly, but timestamp remains unchanged.
• Observe that Date.now() - timestamp is equal to progress_ms with the addition of client/server latency.
Expected behaviour:
• timestamp should represent the exact moment that progress_ms was calculated.
Actual behaviour:
• timestamp represents the exact moment the user started playback of the current song.
When fetching a user's currently playing track, the following value is expected in the response (pulled from API documentation):
timestamp | integer | Unix Millisecond Timestamp when data was fetchedBased on my observations, though,
timestampdoesn't represent when the data was fetched. It instead represents when the user started playback of the current song.As of right now, the only way for an application to know current track progress to millisecond accuracy is to derive the value using
Date.now() - timestamp. However, if a user manually seeks within a track this becomes impossible.Endpoint(s):
GET /v1/me/playerScope(s):
user-read-playback-stateSteps to reproduce:
• With a track playing, ping the endpoint multiple consecutive times. Observe that
progress_msupdates properly, buttimestampremains unchanged.• Observe that
Date.now() - timestampis equal toprogress_mswith the addition of client/server latency.Expected behaviour:
•
timestampshould represent the exact moment thatprogress_mswas calculated.Actual behaviour:
•
timestamprepresents the exact moment the user started playback of the current song.