Understand the Dealer WebSocket interface
devThe Dealer is a WebSocket that represents the player as a Spotify Connect device. It is primarily used to receive updates rather than to update the state.
Communication via the Dealer consists of two types of interactions:
- Messages: Fire-and-forget updates that do not require a response. These are used for informational updates (e.g., changes to playlists, liked songs) or fire-and-forget commands (e.g., volume updates, logout requests).
- Requests: Commands that modify the player state. These expect a reply indicating whether the request was processed successfully or failed.
Note on Encoding: Because the device supports gzip, payloads may be BASE64 encoded and gzip compressed. If compressed, the headers will include Transfer-Encoding: gzip.