I have Ubuntu 17.10, Firefox 58.0.2 and PulseAudio installed. However, from time to time audio disappears from videos and I get the following notification on Firefox "To play audio, you may need to install the required PulseAudio software". How to fix this?
EDIT: restarting Firefox seems to fix the issue temporarily.
From https://www.reddit.com/r/firefox/comments/7w171n/to_play_audio_you_may_need_to_install_the/, some say executing
start-pulseaudio-x11
works around the bug you are describing.You may need to install the required PulseAudio software
If you see a notification saying "To play audio, you may need to install the required PulseAudio software", it means that Firefox cannot find or use PulseAudio. Starting with Firefox 52, the PulseAudio software is required to play any audio from Firefox. Most Linux distributions now come with PulseAudio pre-installed.
Use your system's software package manager and ensure that PulseAudio is correctly installed.
PulseAudio can be downloaded from this link: https://www.freedesktop.org/wiki/Software/PulseAudio/
Source