A media player extension for SillyTavern that displays and controls your currently playing music. Works with any MPRIS-compatible media player on Linux (Spotify, VLC, Firefox, Cider, etc.) without needing API keys.
- Now Playing Display - Shows track name, artist, and album art
- Playback Controls - Play/pause, next, previous, shuffle, repeat
- Progress Bar - Visual progress with click-to-seek functionality
- Time Display - Current position and total duration
- Collapsible Sidebar - Minimizes to a small pill when not in use
- MPRIS Integration - Works with any Linux media player
- Optional Spotify API - Direct Spotify control (requires API setup)
- SillyTavern with server plugins enabled
- Linux with
playerctlinstalled - Any active media player (Spotify, VLC, Firefox, etc.)
Download or clone this repository and place the SillyTavern-Spotify folder into:
SillyTavern/public/scripts/extensions/third-party/
Copy the mpris folder into your SillyTavern plugins directory:
SillyTavern/plugins/
Your folder structure should look like:
SillyTavern/plugins/mpris/index.mjs
Edit your SillyTavern config.yaml and set:
enableServerPlugins: trueInstall playerctl using your package manager:
- Arch Linux:
sudo pacman -S playerctl - Debian/Ubuntu:
sudo apt install playerctl - Fedora:
sudo dnf install playerctl
Restart SillyTavern to load the plugin, then refresh your browser.
- Start playing music in any media player (Spotify, VLC, etc.)
- The player sidebar will appear on the left side of SillyTavern
- Use the controls to play/pause, skip tracks, toggle shuffle/repeat
- Click on the progress bar to seek to any position
- Click the collapse button to minimize the player
- Green color + dot = Feature is enabled
- Gray color = Feature is disabled
- "1" on repeat = Repeat single track mode
Access settings via Extensions > Media Player:
| Setting | Description |
|---|---|
| Use Local Control (MPRIS) | Enable local media control (recommended) |
| Enable Player Panel | Show/hide the floating sidebar |
| Spotify API Authentication | Optional: Direct Spotify API control |
For direct Spotify control without a local player:
- Create an app at the Spotify Developer Dashboard
- Add
http://localhost:8000as a redirect URI - Copy your Client ID to the extension settings
- Click "Connect" and authorize
- Verify
enableServerPlugins: truein config.yaml - Check if playerctl is installed:
playerctl status - Ensure a media player is running and playing
- Check browser console for errors
- Restart SillyTavern after installing the plugin
- Hard refresh the browser (Ctrl+Shift+R)
- Try
playerctl play-pausein terminal to test
Album art requires the media player to provide artwork metadata. Some players may not support this feature.
This repository contains two components that go in different locations:
Extension (place in SillyTavern/public/scripts/extensions/third-party/SillyTavern-Spotify/):
├── index.js # Main extension logic
├── settings.html # Settings panel UI
├── style.css # Styles for player and settings
├── manifest.json # Extension metadata
└── README.md
Server Plugin (place in SillyTavern/plugins/mpris/):
└── index.mjs # MPRIS controller using playerctl
GNU License