Background Music for Mac Automatically Pauses Music When Audio Is Played Elsewhere
Mac: If you use software like iTunes, Spotify, or VOX to listen to music on your Mac, then Background Music is a handy little utility that pauses music playback when you play sound in another program (like Chrome), while then auto-resume when done.
When any application other than your music player starts playing sound, Background Music pauses the music playing. So, if you start playing YouTube videos in Chrome while listening to music on Spotify, background music will pause Spotify and then resume playing after the video is finished. It also has a mixer where you can adjust audio levels for each application and even record system audio. However, the background music is very new and is still in early beta testing. You will have to compile it yourself (don’t worry, there is a one-click install script) and you will probably run into some errors. However, it’s free and works well for me on YouTube and Spotify, which covers my personal most common use case for such an app.
Background Music (Free) | GitHub via Hacker News