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.
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.