Announcements

Standardizing Completion of API calls to player/play

Standardizing Completion of API calls to player/play

eboyce452

Dear Spotify:

 

I’m developing an app that creates a series of asynchronous calls to Spotify’s player/play endpoint. The code I wrote is working correctly in that it sends PUT requests to the endpoint near simultaneously. However, each PUT request takes a non-standard amount of time to execute. Sometimes it’s 400ms, sometimes it’s 600ms, other times it’s even more varied. One of the core objectives of my application is synchronized play and the variable timing throws things off.

 

Is there a way to standardize the completion of these requests? My first thought was to time the completion of the request to try to compensate, but rectifying those differences would require another call to the API that would just throw things off again. Can you offer any help on this? I am more than happy to provide any code you want.

Reply
0 Replies

Suggested posts

Env: prod