Matthew Gertner
Matthew Gertner

Reputation: 4537

Suppress screen share permission dialog in Chrome App

We are implementing a Chrome App that runs in a controlled environment on a specific machine under Windows. We have complete control over the environment, including using command-line args to run Chrome, changing registry settings, etc.

Part of the functionality of the app is to take screen captures and stream them to a remote machine. When this feature is initiated, Chrome displays the permission dialog ("Chrome wants to share your screen...") and requires validation by the user.

In the context of our app, this is poor user experience and we would like to find a way to suppress this dialog. As I mentioned, we have complete control over the host machine. Is there any way to do this short of making our own custom Chrome build?

Upvotes: 2

Views: 2782

Answers (2)

Mysterious Jack
Mysterious Jack

Reputation: 641

For C# Selenium Users. Do not put the "Entire screen" in double quotes.

use it as --auto-select-desktop-capture-source=Entire screen //<--observe no double quotes

var chromeOptions = new ChromeOptions();
chromeOptions.AddArguments("--auto-select-desktop-capture-source=Entire screen");
var driver = new ChromeDriver(chromeOptions);

Upvotes: 1

kzahel
kzahel

Reputation: 2785

Try running Chrome with the command line argument --auto-select-desktop-capture-source="Entire screen". Source: Chromium issue. Also related: Issue about force-installed extensions and desktop sharing.

In case you want to compile chrome yourself, this would be a good starting point for whitelisting your own extension

Upvotes: 3

Related Questions