Control each Firefox tab's audio individually from your desktop media controls on Linux.
Media Bridge creates separate MPRIS media players for each browser tab playing audio. This means you can control YouTube, Spotify Web, SoundCloud, and any other audio source independently using your desktop's media keys, system tray, or any MPRIS-compatible controller — just like native desktop apps.
- 🎵 Per-tab media controls - Each tab gets its own MPRIS player
- ⌨️ Media key support - Play/pause/next/previous from your keyboard
- 🖥️ Desktop integration - Shows up in your system tray and media widgets
- 🎬 Works everywhere - YouTube, Spotify, SoundCloud, podcasts, and any site with audio/video
- 🔒 Privacy-focused - No data collection, works entirely locally
Media Bridge requires two components:
Install from Mozilla Add-ons (approved!)
Or install from source:
git clone https://github.com/saltnpepper97/media-bridge.git
cd sound-tabs/extension
# Load as temporary extension in Firefox (about:debugging)The extension communicates with MPRIS through a native messaging bridge.
Install the native host manifest:
# Create the directory if it doesn't exist
mkdir -p ~/.mozilla/native-messaging-hosts/
# Copy the manifest
cp native-host/media_bridge.json ~/.mozilla/native-messaging-hosts/Install the Python bridge script:
-
Use Stasis's script (if you're already using Stasis):
# Install from Stasis repository git clone https://github.com/saltnpepper97/stasis.git cd stasis # Follow Stasis installation instructions
-
Adapt the script for standalone use (for developers):
- Check out the Stasis repository
- Extract/modify the MPRIS bridge functionality for your setup
- Place your script at
/usr/local/bin/media_bridge_host.py - Make it executable:
chmod +x /usr/local/bin/media_bridge_host.py
A standalone version of the bridge script is planned for a future release.
- Install both components (extension + native host)
- Restart Firefox
- Open any website with audio/video (YouTube, Spotify, etc.)
- Control playback from:
- Your keyboard media keys
- System tray media controls
- KDE Plasma's media widget
- GNOME's media controls
- Any MPRIS-compatible controller
Each tab appears as a separate player with its own controls!
- Firefox (tested on recent versions)
- Linux with MPRIS support (KDE Plasma, GNOME, etc.)
- Python 3 (for the native bridge)
- D-Bus (standard on most Linux desktops)
Check if the native host is properly connected:
- Open Firefox's Browser Console (Ctrl+Shift+J)
- Look for messages from Media Bridge
- You should see:
✓ Connected to native host - If you see connection errors, verify:
media_bridge.jsonis in~/.mozilla/native-messaging-hosts/- The Python script path in the JSON is correct
- The Python script is executable
- Ensure the Python script has proper permissions
- Check that all Python dependencies are installed
- Look for error messages in Firefox's Browser Console
- Verify your desktop environment supports MPRIS
- Test with:
busctl --user list | grep mpris - Check if other MPRIS apps work (VLC, Spotify, etc.)
media-bridge/
├── extension/ # Firefox extension
│ ├── manifest.json # Extension manifest
│ ├── background.js # Extension background script
│ └── content.js # Content script for media detection
└── native-host/ # Native messaging configuration
└── media_bridge.json # Native host manifest
# Clone the repository
git clone https://github.com/saltnpepper97/media-bridge.git
cd media-bridge
# Install the extension temporarily in Firefox
# 1. Open about:debugging
# 2. Click "This Firefox"
# 3. Click "Load Temporary Add-on"
# 4. Select manifest.json from the extension/ folder
# Install native host
mkdir -p ~/.mozilla/native-messaging-hosts/
cp native-host/media_bridge.json ~/.mozilla/native-messaging-hosts/Media Bridge does not collect any data. All communication happens locally between:
- Firefox tabs ↔ Extension background script ↔ Native host ↔ D-Bus/MPRIS
No telemetry, no analytics, no external servers.
Contributions welcome! Feel free to:
- Report bugs
- Submit pull requests
- Suggest features
- Improve documentation
MIT License - see LICENSE file for details
- Built for the Linux desktop community
- Uses MPRIS for desktop integration
- Native messaging bridge implementation from Stasis
- Stasis - Wayland idle manager (includes the MPRIS bridge)
- Plasma Browser Integration - KDE's browser integration
- MPRIS specification
Note: This extension requires manual installation of the native messaging host. A future version may include an automated installer or standalone bridge script.