The currently-Firefox OS-only AudioChannels API allows you to specify the position your audio occupies in a hierarchy of importance. Going forward, less important audio items and events will not pause your audio playing, but more important ones will.
chrisdavidmills/audio-channels-demo-web-audio-api
An experiment to try getting AudioChannels working in Web Audio API.
JavaScript