Overview
A listening party normally carries one sound: the station stream, which everybody in the car hears at the same moment. That is the shipped behaviour and it is described in Radio and settings.
Spotify Connect mode is an opt in second mode for one listener at a time. Instead of hearing the station, your own Spotify app plays the same track at the same point, and the game stream is muted for you alone. Everybody else in the party carries on hearing the station. It is a per listener choice that changes nothing for anyone else.
The game never handles Spotify audio. It tells Spotify's own service, through your linked account, which track to play and where to be in it. Your Spotify app does the playing. This is the only lawful way to put real Spotify audio near this feature, and it is why the mode needs Premium and a device that is already awake.
Current status
Three things stand between this and a working feature, and only the first is close.
Piece | Where it lives | State |
|---|---|---|
Game side conductor and panel |
| Written, typechecks, not committed to main |
The endpoint it calls | UCP API, | Written, not deployed. Returns 404 today |
Playback permission on linked accounts | UCP Spotify link | Not granted. Existing links carry no playback scopes |
The third is the one that decides the date. Every Spotify account already linked on the UCP was linked for search and identity only. Controlling playback needs different permissions, which means every player who wants this mode has to re authorise, and the UCP needs a route that asks for it. Until that exists, switching the mode on would give everyone not_linked and nothing else.
What a listener would do
- Link Spotify with playback permission
On the UCP at
https://ucp.roleplayproject.net/settings. A link made for search alone is not enough, and the panel will saynot_linkeduntil the permission is there. - Have Premium and an awake device
Spotify does not allow remote control of a Free account, and it will not play to an app that is fully closed. Open Spotify on your phone or desktop first.
- Turn Connect mode on in the party panel
The game stream mutes for you alone and your Spotify app starts the current track at the current position. Everybody else keeps hearing the station.
- Resync if you drift
/party resyncputs you back on the party's position. There is a ten second cooldown on it. - Turn it off, or leave
Either brings the station back. Nothing is left playing on your device.
How it stays in time
The conductor keeps one anchor per party, not one per listener. The anchor is the wall clock time at which the current track would have been at zero. A listener's position is then simply the time since that anchor, which costs nothing to compute and never drifts between listeners.
The station's own reported progress is sampled every tick. If it disagrees with the anchor by more than the anchor tolerance, the anchor moves and the jump is recorded. A recorded jump larger than the drift tolerance is what triggers a seek for listeners who have not been spoken to since it happened.
Three operations are ever sent: play when the track changed, seek when the anchor jumped or the heartbeat came due, and stop when the mode ends. Everything is batched per party, and a track within its final ten seconds is left alone rather than being started twice.
States
The panel shows one of these. Anything other than playing and starting means the station is still your sound.
State | What it means |
|---|---|
| Mode is not on. You hear the station |
| Instruction sent, waiting for your device to pick it up |
| Your Spotify is carrying the party |
| The party is between tracks |
| No Spotify account linked, or no playback permission on the link |
| The account is Free. Spotify does not allow remote control without Premium |
| No Spotify app awake to play to. Open Spotify and press resync |
| The link expired or lacks a permission it used to have. Re link on the UCP |
| The account is not registered against this Spotify application |
| Spotify is throttling us. It clears on its own |
| The instruction did not take. Resync, or turn it off and on |
| The mode is switched off server side. This is the state today |
Numbers
Setting | Constant | Value |
|---|---|---|
Tick |
| 1 s |
Send lead |
| 700 ms |
Anchor tolerance |
| 2 s |
Drift tolerance before a seek |
| 2.5 s |
Minimum gap between seeks |
| 20 s |
Heartbeat seek |
| 90 s |
Tail left alone |
| 10 s |
Grace after a play |
| 1.5 s |
Listeners per request |
| 20 |
Requests per tick |
| 2 |
Toggle cooldown |
| 3 s |
Resync cooldown |
| 10 s |
Server wide operations budget |
| 240 per minute |
Endpoint timeout |
| 10 s |
The global budget is a ceiling on how hard the whole server may push Spotify in any minute. Plays are always spent first and seeks take what is left, so a busy night degrades into slightly looser sync rather than into failed starts.
What it deliberately does not do
It does not play Spotify audio through the game. It asks your app to play, and your app plays.
It does not change what anybody else hears. The station keeps carrying the party.
It does not queue, buy, or store music, and it holds no audio of any kind.
It does not work without Premium, and that is Spotify's rule, not ours.
Before it can ship
- Commit the game side
Four new files and changes to the party manager, currently uncommitted.
- Deploy the application side of the endpoint guard
The web server already refuses these paths from outside. The matching check inside the application is written and goes out with the next UCP deployment.
- Build the re authorisation route on the UCP
Existing links carry no playback permission, so every interested player has to link again through a route that asks for it. This is the long pole.
- Deploy the UCP API
That restarts shared sign on, so it needs a scheduled slot rather than being done casually.
- Switch on the master switch
LP_SPOTIFY_PERSONAL_ENABLEDin the server environment. It is off, and with it off the mode reportsunavailableand costs nothing.
Related: Radio and settings, Default keys.