jonvuri / tonlist

Collaborative video / music player
0 stars 0 forks source link

[Player] Track entry start time, and seek newly connecting clients to current time based on it #10

Open jonvuri opened 5 months ago

jonvuri commented 5 months ago

When a playlist entry first starts playing, store the time that it started in the PlayerState (the current time in milliseconds).

Then, when a new client connects and first renders the player, calculate the player start time as (current time) - (start time), so that it starts playback at roughly the same time that other players would currently be in the media.