Autostop background music if video is playing

Hey there,

is it possible to automatically stop the music which is currently playing as soon another audio or video with audio is fired?

Thank you and have a great day.

Andreas