-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support fake camera and microphone permissions #2525
Comments
I unable to grant permission for camera and microphone across the browsers |
Those permissions are not supported yet. What is your scenario? |
I need to grant permission by default for microphone and audio ! |
But do I understand it right that your scenario is not test-related? Why do you need that permission? Do you intend to record mic after that? |
I have the same issue, trying to set Do you have an estimate of when this might be supported? |
I just found a way to get it to work for me with chromium:
|
+1 for microphone/camera permissions support. Need to test videochat (at least starting videochat). Maybe some mocked ones? |
Context:
I'm testing a Videochat App and I was looking for how to pass arguments to Webkit but I can't find any information in the docs. I was able to do in Chrome and Firefox:
When I run the code block above it runs perfectly in Chrome and Firefox but when it's time for WebKit I got this (I guess expected) error:
If I get rid of this line |
I'll close this as a part of the bug triaging process. We have hundreds of bugs and feature requests with dozens and even hundreds of upvotes, while this one only has a few thumbs up. Please feel free to open a new bug and link this one if you'd like to see it addressed. |
the following works for loading permissions for microphone
|
I'm lost, I would like to know if I could use permissions=['camera'], if I could choose an output device in the code, preferably for mac, then I could use OBS instead of the default camera |
const playwright = require("playwright");
const iPhone11 = playwright.devices["iPhone 11 Pro"];
(async () => {
// Try to add 'firefox' to the list ↓
const browser = await playwright.firefox.launch();
const context = await browser.newContext({
geolocation: { longitude: 52.520008, latitude: 13.404954 },
permissions: ["camera","microphone"],
});
const page = await context.newPage();
await page.goto('http://whatsmyuseragent.org/');
await page.screenshot({ path:
example.png
});await browser.close();
})();
The text was updated successfully, but these errors were encountered: