Per comment at https://bugzilla.mozilla.org/show_bug.cgi?id=863267#c43

I think, there is one thing to be done here.

We need to check if the headphone is currently plugged in "before" playback and if it starts to play sound over the limit, then the volume is automatically adjusted to the  max allowed below the limit without any warning.