0

I want to record a Google Chrome browser session on docker+xvfb using screen sharing + webRTC. I start the share using this code:

   navigator.mediaDevices
      .getUserMedia({
            video: { displaySurface: "monitor" },
            audio: true,
            selfBrowserSurface: "include",
            systemAudio: "include"
        })
      .then((localStream) => {
        localStream
                .getTracks()
                .forEach((track) => connScreen.addTrack(track, localStream));
      });

When I test it using Google Chrome browser outside docker+xvfb I get the normal auhtorization popup, which lets me select which screen/window I want to start sharing.

But when I run it on Google Chrome browser inside docker+xvfb I get the camera/microphone popup authorization and have no option to share the screen.

I suspect there is something on my native Google Chrome Profile that is missing on Google Chrome inside docker.

So, I suspect the solution is to set something on Google Chrome profile, but for me is either ok to set something on profile or to change something on the javascript code. I just want to ensure that the share screen popup appears.

Does someone knows a way on javascript to force the screen share popup appear OR a way to configure Google Chrome browser to get the same behavior?

vuco
  • 161
  • 2
  • 6

0 Answers0