-
-
Notifications
You must be signed in to change notification settings - Fork 42
Native Streaming
spotatui includes native Spotify Connect support, allowing it to play audio directly on your computer without needing an external player like spotifyd.
The native streaming feature uses a separate authentication flow. On first run:
- Your browser will open to Spotify's authorization page
-
Important: The redirect URI will be
http://127.0.0.1:8989/login- this is different from the main app's callback URL - After authorizing, "spotatui" will appear in your Spotify Connect device list
- Credentials are cached so you only need to do this once
- When streaming is enabled, "spotatui" registers as a Spotify Connect device
- You can control playback from the TUI, your phone, or any other Spotify client
- Audio plays directly on the computer running spotatui
- Native streaming is enabled by default when built with the
streamingfeature - A Spotify Premium account is required for playback (free accounts fall back to controlling other devices via the Web API)
- The streaming authentication uses a different client than the main app's API controls
- A stable device id is persisted under
~/.config/spotatui/streaming_cache/so reconnecting does not leave "ghost" Connect devices behind
When using native streaming on Linux, spotatui automatically registers with the MPRIS D-Bus interface, enabling:
- Media key support - Play/pause, next, previous via keyboard media keys
- Desktop integration - Track info appears in GNOME/KDE media widgets
- playerctl compatibility - Control spotatui from the command line:
# Check available players
playerctl -l
# Should show: spotatui
# Control playback
playerctl -p spotatui play-pause
playerctl -p spotatui next
playerctl -p spotatui previous
# View current track metadata
playerctl -p spotatui metadataMPRIS is enabled by default on Linux builds with native streaming (feature mpris).
When using native streaming on macOS, spotatui registers with the system's Now Playing interface, enabling:
- Media key support - Play/pause, next, previous via keyboard media keys
- Control Center integration - Control playback from macOS Control Center
- Touch Bar support - Media controls on MacBook Pro Touch Bar
- AirPods / Headphone controls - Play/pause and skip via Bluetooth headphone buttons
This feature uses Apple's MPNowPlayingInfoCenter / MPRemoteCommandCenter APIs and is enabled by
default on macOS builds with native streaming (feature macos-media).
On Windows, spotatui registers with the
System Media Transport Controls
(SMTC) β the media overlay surfaced through media keys, the volume flyout, and the taskbar / Win+G
Game Bar controls. This enables:
- Media key support - Play/pause, next, previous via keyboard media keys
- System Now Playing display - Track title, artist, album, and cover art in the Windows media flyout
- Position & playback state - Reflected live in the SMTC display
This integration is built on smtc-tokio, is enabled by default on Windows builds (feature
windows-media), and activates when the native player is running. Media keys are routed to the native
player when a native track is loaded, otherwise to the Spotify Web API.