MPRIS
The MPRIS backend auto-discovers every MPRIS-compatible player (Spotify, VLC, Firefox, MPD, Kodi, Bluetooth devices) and exposes unified playback controls. Players appear and disappear in real time — no configuration needed.
Endpoints
Section titled “Endpoints”List players
Section titled “List players”GET /playersReturns all active players with their current state: playback status, track metadata, volume, shuffle, loop mode, and position.
Playback control
Section titled “Playback control”POST /players/{player}/playPOST /players/{player}/pausePOST /players/{player}/play_pausePOST /players/{player}/stopPOST /players/{player}/nextPOST /players/{player}/previousSeek and position
Section titled “Seek and position”POST /players/{player}/seek{ "offset": 1000000 }POST /players/{player}/position{ "track_id": "...", "position": 0 }Volume, loop, shuffle
Section titled “Volume, loop, shuffle”POST /players/{player}/volume{ "volume": 0.5 }POST /players/{player}/loop{ "loop": "None|Track|Playlist" }POST /players/{player}/shuffle{ "shuffle": true }Events
Section titled “Events”| Event | Trigger |
|---|---|
player.updated | Playback state, volume, or metadata change |
player.added | New player appeared |
player.removed | Player closed |
player.position | Periodic position tick |
How it works
Section titled “How it works”The backend listens on D-Bus for org.mpris.MediaPlayer2 interfaces. Player state is cached and invalidated via D-Bus signals, with a heartbeat for accurate position tracking.