mviereck / x11docker

Run GUI applications and desktops in docker and podman containers. Focus on security.
MIT License
5.68k stars 379 forks source link

How to add microphone access to container for multiple clients? #514

Open mremasoudian opened 1 year ago

mremasoudian commented 1 year ago

I’m running into a frustrating problem. I installed an ubuntu version 20.04 and installed Docker on it

I started a container named linuxserver/firefox on Docker.

I tried to set up the microphone for users who use this image, but unfortunately I could not do this.

Is there a way to add microphone access to this image?

thanks a lot

echuber2 commented 1 year ago

I haven't tried using the microphone, but audio at least works with the PulseAudio option. Have you tried the options listed here?

https://github.com/mviereck/x11docker#sound https://github.com/mviereck/x11docker#webcam

mremasoudian commented 1 year ago

Thank you for your answer, Yes, I did what you said, but it was not possible to access the microphone. :frowning_face: I was able to share my host’s microphone with container before. And I was able to do this from the link below. https://comp0016-team-24.github.io/dev/problem-solving/2020/10/30/passing-audio-into-docker.html

But I don’t want this I want to make the container connect to the user’s driver like kasm workspace.But because using kasm is expensive for me, I don’t want to use it

mviereck commented 7 months ago

It should just work with --pulseaudio. If not, build an image with pavucontrol and run pavucontrol with --pulseaudio in container to look for the microphone. It should appear there.