Inspired by OperaGX's music player, AutoBGM brings a similar functionality to chromium. Automatically pause your music when there's another tab playing audio, and resume your music once the other audio stops.
Pin the tab that has your music, and continue with your usual browsing. The extension will not affect the music tab if you have the music paused manually.
The extension works by simulating the spacebar, so it will work for every site that can be paused and resumed with the spacebar. Only have one tab pinned otherwise the you may get undesired results.
- Download/clone this repository
- Navigate to
chrome://extensions
- Enable developer mode
- Press the
Load unpacked
button - Select the
src
folder from the repository you downloaded
- Codevolution's Chrome Extension Tutorial for the short and detailed videos
- MusicControllerChromeExtension for giving me the idea of controlling the audio with the Spacebar
- Grepper for where I found the js code for simulating the Spacebar
- Chrome's wonderful documentation