Firefox doesn't play audio

If you install an app called "pavucontrol", (direct link apt://pavucontrol ) you can look at which applications are playing audio, and which device they are sending audio to on a per-application basis.

Because (as far as I know) firefox does not have any way to select an audio output device, if you change the output device for an application it will retain that information.... my guess is that at some point you, or someone else (or some application) has selected HDMI audio for firefox, and that has been stored.... you just need to change it back to the default device.


Long story short:

change audio output device to something else and then back to the desired device


Full version:

I know it's bit outdated, but still. I've just run into similar problem on Ubuntu GNOME 15.10 - everything worked apart Firefox. I remember lately using my laptop with TV via HDMI and changing sound output to it. Today, in my "Sound" application, I had only one position available: "Speakers - Built-in audio". Plugging in headphones to my dock or socket on laptop's side didn't change a thing.

I managed to get it working with some workaround - I suspected that if I will be able to choose something else from the output devices list and then back to "Speakers - Built-in audio", Firefox will be updated with this info. Luckily, I had some USB speakers in the office and it did the trick - new device appeared on the list so I switched to it - sound was working. Back to "Speakers ..." - working.

It looks like some small bug (or maybe that's intentional) when there is only one device on the list, it doesn't refresh selection when clicked.


Run:

rm -r ~/.config/pulse; pulseaudio -k

This will clear hdmi settings and settings will be back to default.

Note that this may delete other manual pulse configuration too.