zembrodt / showtunes

Angular App to display music you are currently listening to
GNU General Public License v3.0
3 stars 0 forks source link

Refactor controls to be more responsive #67

Open zembrodt opened 1 month ago

zembrodt commented 1 month ago

The current track controls rely on the Spotify current playback response to update their state. This can lead to unresponsive UI with track controls. Instead, refactor them to update based on a local state of play, then correct the controls state from Spotify's playback response if they're out-of-sync.

This will likely require some code to determine if a control was just updated locally before Spotify can reply back with the updated playback state. As such, we should ignore control state updates from the playback response if the control was just updated locally.