spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
981 stars 79 forks source link

Difference of 0.5 seconds between web player and native desktop player #702

Open bichotll opened 7 years ago

bichotll commented 7 years ago

Issue found on ~September 2017.

Introduction

As I mentioned in a previous issue, I'm working implementing a JS player that communicates and syncs with the Spotify one (either web or desktop player). Following the steps and mapping the current time to my precise player (I have X events marked by the drums), I noticed that the desktop player is always off by 0.5s.

Endpoint(s):

Steps to reproduce:

Web player
  1. Open open.spotify.com
  2. Call play method
  3. Call player method to get the current time
    Native player
  4. Open the native desktop app
  5. Call play method
  6. Call player method to get the current time

Expected behaviour:

The time should the same.

Actual behaviour:

The desktop player time is off by around 0.5s.

Additional notes

I have noticed that the web app works with a websocket that send a message with the current timestamp (in ms) when the user starts playing. Could it be that the desktop app sends the event before the actual player starts playing? (~500ms).

Lastly, seeing this scenario - I'd appreciate, if that's the case, if there is anything you guys can explain me that could help my precise player to be even more precise :)

hughrawlinson commented 7 years ago

Hi! Thanks for the report. We'll look into it.

philippk80 commented 6 years ago

Hey, how are you synchronizing your player clock with the clock that generated the timestamp?