Now playing

Get now playing

GET/api/nowplaying
Open. Open to everyone who can reach Tempolight.

Whether reading what music apps play works here, how, the track, and the Spotify account. When the track is a remembered song, the lights follow its beat map.

Responses

200OKapplication/json
enabledboolean
supportedboolean
platformstring
statestring
One of "ok" "starting" "unavailable" "error" "off"
messagestring | null
methodstring | null
One of "osascript" "playerctl" "dbus-send" "powershell" null
trackobject | null

{source, app, device, title, artist, album, dur, pos, playing, posKnown, remembered, following}.

spotifyobject
Request
curl 'http://localhost:8080/api/nowplaying'
Response
{
  "enabled": true,
  "supported": true,
  "platform": "darwin",
  "state": "ok",
  "message": null,
  "method": "osascript",
  "track": null,
  "spotify": {
    "clientId": "",
    "connected": false,
    "error": null,
    "redirectUri": "http://127.0.0.1:8080/api/nowplaying/spotify/callback"
  }
}
Edit on GitHub