Disable notifications while watching videos or listening to music Is it possible to disable WhatsApp Status bar notifications while watching YouTube videos on a Android device or while playing music on Android device?

I don't want to disable WhatsApp notifications in any other conditions, but only when I am watching videos or while listening to music/song.

I know it is possible to disable notifications of an app (like WhatsApp), but that will block it for all the time. This I don't want to happen. I would like to continue to receive WhatsApp notifications but not while watching videos or while listening to music/song.

My Device: Micromax Canvas 4 
Android OS: 4.2

Is this possible?
When you are watching youtube, temporary put your phone on silent.

However you can also use this app: https://play.google.com/store/apps/details?id=com.pierceholdings.dontpause&amp;hl=en