Windows: Mute.fm is a Windows utility that automatically lowers the volume and pauses your music when you start watching a web video or video file on your computer. When the show's over, it will un-pause your music and bring the volume back up. Best of all, it works with a variety of music players.
Mute.fm models itself after the way Windows 7 and 8 can automatically lower the volume of noisy apps in the background when your get a VoIP call. The app, once installed, runs quietly in the background. When you fire up your favourite music player -- whether it's iTunes, foobar2000, Winamp, Pandora, Spotify or a number of others, the tool knows you're listening to music. When another app appears and starts playing more audio, like a video player, it will lower the volume and mute the background music player so you can watch your video without music in the background. If it's a supported music player, it will even pause the music for you. Then, when you've finished the video, it will wait a few seconds and then raise the volume again.
I tried the app out, and it works -- it was a little finicky about which apps were background and which weren't, but once I told it which was my background music app, it was able to mute it without issue when I played something else. If your music player isn't one of the supported ones, you can still tell Mute.fm which app it is yourself, or you can use its built-in editor to give specific commands to pause that application.
If you listen to a lot of streaming music via the web, it even has a built-in Chromium-based browser you can use so you get the benefit of the auto-muting (and you can play your streaming tunes like a desktop app, without using your browser.)
Hit the link below to give it a try, or head over to the Mute.fm FAQ to read more about it.