Automatically mute the "music" audio stream while in "priority/silent mode"
When enabling the "silent mode" (Android 4.x), the "priority mode" (Android 5.0) or just switching to "vibration mode", apps are still able to play sounds through the "music" audio stream.
So music or video apps and games can still play music, even when the device should be muted.
"Media-Mute" automatically detects when you enter silent/priority/vibration mode and then sets the volume of the "music" audio stream to 0, muting even media apps and most games. When leaving silent/priority/vibration mode, the app restores your old volume.
Additionally, you can always overwrite the set volume by just increasing the volume with your hardware volume buttons while a video is playing.
The new "do not disturb mode" (Android 6.0+) works better, but apps are still able to make noise if you put your phone in "vibration" mode rather then the all-blocking DND mode.
The app is open source: https://github.com/j4velin/Media-Priority-Mode