ted-piotrowski / puppeteer-camera

Dockerized API for recording websites
MIT License
12 stars 4 forks source link

When I get inside some site that is using WebRTC I'm getting this pop up "The extension "Video Capture Attempt #1" wants to share the contents of your screen." #1

Open DeividVeloso opened 3 years ago

DeividVeloso commented 3 years ago

Hey guys, first thank you for the work on this package.

I'm having some trouble when I try to record a website that uses WebRTC/Video Conference. When I get inside the site with puppeteer browser instance I'm getting this popup automatically, how can I skip this popup, or click in share audio using `puppeteer's functions?

image

When I try to record a Youtube video it is working normally and it is not showing this popup.

I'm using these options to launch the browser

   const options = {
      headless: false,
      args: [
        "--no-sandbox",
        "--use-fake-ui-for-media-stream",
        "--use-fake-device-for-media-stream",
        "--allow-file-access-from-files",
        "--enable-usermedia-screen-capturing",
        "--allow-http-screen-capture",
        "--auto-select-desktop-capture-source=puppetcam",
        "--load-extension=" + path.join(__dirname, "chrome_extension"),
        "--disable-extensions-except=" +
          path.join(__dirname, "chrome_extension"),
        "--disable-infobars",
        `--window-size=${width},${height}`,
        "--autoplay-policy=no-user-gesture-required",
        '--enable-automation',
        "--autoplay-policy=no-user-gesture-required",
      ],
      ignoreDefaultArgs: ["--mute-audio"],
    };
ted-piotrowski commented 3 years ago

Thanks for reporting the issue. I haven't used this in some time so no immediate workaround until I investigate the issue. It would help if you could:

  1. Provide the website you're trying to record if it is externally accessible and not private
  2. Provide the browser version using puppeteer const version = await page.browser().version();

Cheers.