jlesage / docker-firefox

Docker container for Firefox
MIT License
1.4k stars 266 forks source link

[Feature request] Adding pulseaudio installation in Dockerfile #188

Closed pokemaster974 closed 1 year ago

pokemaster974 commented 1 year ago

Idea

On Windows, I can't get the audio ouput. Regarding this article, new version of WSL seems to let use use a env variable and a volume variable to have audio.

But the container seems to have pulseaudio installed.

What do you think about adding RUN add-pkg pulseaudio ?

Sorry, I haven't all the skills for a good comprehension of it could work or not, just an idea to trying to have audio on my Windows host.

Regards.

jlesage commented 1 year ago

You can automatically install pulseaudio by setting the INSTALL_PACKAGES environment variable to pulseaudio pulseaudio-alsa.

But to provide real audio support to users, I think the solution is to have audio through the web browser (work for this is not completed yet).

pokemaster974 commented 1 year ago

You can automatically install pulseaudio by setting the INSTALL_PACKAGES environment variable to pulseaudio pulseaudio-alsa.

But to provide real audio support to users, I think the solution is to have audio through the web browser (work for this is not completed yet).

Thanks for your reply @jlesage. In fact, I think I misunderstood how it works. So I run my container with these adds -v \\wsl$\Ubuntu\mnt\wslg:/mnt/wslg/ -e "PULSE_SERVER=/mnt/wslg/PulseServer" I got sound on my host (my Windows 11 computer) but still no sound on my remote browser.

There is no solution if we are in Windows and have no device /dev/snd ? Regards.

jlesage commented 1 year ago

I got sound on my host (my Windows 11 computer) but still no sound on my remote browser.

The method described by the article provides sound only on the host running the container. If you are connecting to the container via another machine, then you won't get sound on this machine.

So currently, the container doesn't support sound when accessing from different machines. Note that this is not a limitation of Windows.

pokemaster974 commented 1 year ago

Sorry, guessing it was possible with Linux with device /dev/snd. I close the issue as I'm not sure it can be feasible to have sound on the remote browser which was my goal. Thanks for your explainations.