Skip to content

Integrate Spotuify with operating-system media controls #23

Description

@austin-smith

Summary

Integrate Spotuify with each supported operating system's standard media-session interface:

  • MPRIS on Linux
  • Now Playing and remote commands on macOS
  • System Media Transport Controls on Windows

The integration should publish current metadata and playback state, and accept the controls each platform supports, including play/pause, next, previous, and seeking where available. Optional track-change notifications can use the same event source.

Why

When Spotuify is the local Spotify receiver, hardware media keys, lock-screen controls, desktop media widgets, and system now-playing surfaces should work without another Spotify client. This also makes local playback feel like a native participant in the desktop rather than an isolated terminal process.

Important behavior

  • Derive metadata, progress, and playback state from Spotuify's existing authoritative playback state. OS integration must not introduce another Spotify polling loop.
  • Publish title, artist/show, album, artwork, duration, position, play/pause state, and supported commands when those values are known.
  • Route incoming media commands through the same playback orchestration used by keyboard input so local-versus-remote routing, acknowledgements, and stale-state guards remain intact.
  • Register only while Spotuify has a meaningful media session and remove the registration and metadata cleanly on shutdown or unrecoverable engine failure.
  • Decide explicitly how remote-device playback behaves. Avoid fighting an official client for global media ownership or presenting duplicate system sessions.
  • Keep platform integration optional and fail gracefully when D-Bus, WinRT, artwork, or another platform service is unavailable.
  • Metadata publication and artwork loading must be bounded and must never delay playback events or command acknowledgements.
  • Notifications should be configurable, deduplicated on reconciliation, and emitted on real track changes rather than every state refresh.

Out of scope

  • Exposing Spotuify as a network media server
  • Replacing Spotify Connect device discovery
  • A desktop tray application or graphical controller
  • Platform-specific audio routing controls

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions