SUMMARY Similar to how phones do it. When the option is set,, whenever audio playback moves from one port to another (for example when front panel headphones are disconnected), the media player should pause all playback. The option should be fine grained enough to set if moving from front panel to back or if moving from back panel to front pauses the playback
...Why? What's the use case?
If you're in any sort of public situation, the pause would allow to not blast the audio around you in the case that you accidentally unplug the audio jack.
I imagine there are non-public situations where this would also make sense: using your computer next to a sleeping spouse, child, or roommate, for example. But when you're not in such an environment, it would be really annoying, so it couldn't be a thing that just always happens. So an option could work here, but the system can't detect when you're in an environment that would benefit from this feature, so you would have to remember to turn the option on when you're in such an environment. And if you're going to need to remember to turn something on manually... you might as well just remember to pause the audio before unplugging your headphones. :)
I think it's a reasonable request and I've wanted to implement that for a while. We can even implement it in a way that it is only done when going from Headphones->Speaker and not the other way around or speaker->speaker, thus minimizing false positives
If we can do just that, it would probably be fine, ok. Not sure I would want a user-facing option for it though--or at least, it should be on by default if we do add one. If you have to know about it and go turn it, most people won't, largely defeating the point of any safety it would offer.
The port type information requires PulseAudio 14, which is recent, but not too recent, so we should be fine. I agree that it should be on by default
*** Bug 453924 has been marked as a duplicate of this bug. ***