New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 883978 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 28 days ago
Closed: Dec 19
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Permission overrides don't account for getUserMedia codepath

Project Member Reported by ericbidelman@chromium.org, Sep 13

Issue description

Chrome Version: 71.0.3542.0 (Developer Build) (64-bit)
OS: all

Puppeteer downstream issue: https://github.com/GoogleChrome/puppeteer/issues/3241

What steps will reproduce the problem?
(1) Run the code below.

What is the expected result?

Chrome has already been granted camera permission through protocol API so the getUserMedia demo should just start working and there should be no permission dialog.

What happens instead?

The scripts clicks the "Open camera" button for the user and Chrome still prompts to allow camera access.



const URL = require('url').URL;

const url = new URL('https://webrtc.github.io/samples/src/content/getusermedia/gum/');

const browser = await puppeteer.launch({headless: false});

const context = browser.defaultBrowserContext();
context.clearPermissionOverrides();
context.overridePermissions(url.origin, ['camera']);

const page = await context.newPage();
await page.goto(url.href);

const granted = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'camera'})).state;
});
console.log('Granted:', granted);

await page.$eval('#showVideo', el => el.click()); // clicks the "open camera' button


 
Status: Fixed (was: Untriaged)
This has been fixed some time ago - the demo works fine for me with Puppeteer 1.11.0

Sign in to add a comment