Installation

In order to enable the demo, the following steps must be executed.

Enable the GetDisplayMediaSet and GetDisplayMediaSetAutoSelectAllScreens flags

The GetDisplayMediaSet API and the autoSelectAllScreens attribute can be exposed by setting the the following flags to enabled:

This can be done by opening the chrome://flags/ page on the testing client.

Enable the GetDisplayMediaSetSelectAllScreensAllowedForUrls policy

In order to prevent unauthorized access to sensitive data, administrators must explicitly unlock the autoSelectAllScreens attribute for certain PWAs. This can be done by adding the PWA origin to the GetDisplayMediaSetSelectAllScreensAllowedForUrls policy (e.g. for this demo the value must be https://honey-quartz-fukuiraptor.glitch.me/). If the origin is not allowlisted in the policy, the browser window will be terminated for security and privacy reasons (Update: from ChromeOS 109, the browser window will not be terminated. Instead, the API will just return a permission error).

An app origin can be allowlisted by navigating in the admin panel to Devices → Settings → Users and browsers. After selecting the organizational unit the devices belongs to, the Auto-select for multi screen captures policy can be found in the Security section. When clicking on the policy, a list of allowlisted app origins can be defined (see screenshot below).

Admin panel setting for allowlisted multicapture origins.

To check if the policy value propagated to the client, open the chrome://policy/ page on the testing client and search for the GetDisplayMediaSetSelectAllScreensAllowedForUrls policy. It should contain the origin of the screen capturing PWA (Note:: click on Reload policies. Propagation may take up to a minute).