Automatically pauses Spotify when Firefox starts playing audio (e.g., a YouTube video) and resumes Spotify playback when Firefox stops. Great for preventing overlapping audio when browsing and listening to music.
- Detects when Firefox starts/stops playing audio
- Pauses Spotify when Firefox starts playing
- Automatically resumes Spotify playback once Firefox stops
- Lightweight and runs in the background
-
Clone or download this repository
-
Place the script and libraries in the same folder
-
Add to Startup (optional) To run the script automatically on startup:
- Press
Win + R, typeshell:startup, and hit Enter. - Create a shortcut to
PauseUnpause.ahkin this folder.
- Run the script
Double-click
PauseUnpause.ahkto start it. The script will now monitor audio playback from Firefox and control Spotify accordingly.
- This script assumes Spotify and Firefox are installed and running with the following
SourceAppUserModelIds: firefox.exefor Firefoxspotify.exefor Spotify
MIT License – feel free to use and modify.