Skip to content
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

[Question] How to test web cam and mic using playwright? #24589

Closed
siddharth2023 opened this issue Aug 3, 2023 · 2 comments
Closed

[Question] How to test web cam and mic using playwright? #24589

siddharth2023 opened this issue Aug 3, 2023 · 2 comments

Comments

@siddharth2023
Copy link

siddharth2023 commented Aug 3, 2023

Here's a link to the video test in My test repo

I want to test webcam and mic on my web app so I am launching a context with the below flags. However I am not able to see the video. Also how do I add audio to my test so my web app can detect what's being said in the audio?

tests/testFixture.ts

context = await chromium.launchPersistentContext("", {
      headless: false,
      args: [
        "--auto-accept-camera-and-microphone-capture",
        "-use-fake-device-for-media-stream",
        // "--use-fake-ui-for-media-stream",
        "--use-file-for-fake-video-capture=sample_video.y4m",
      ],
    });

Also, is y4m the only accepted video format for testing?

@uchagani
Copy link
Contributor

uchagani commented Aug 5, 2023

@dgozman
Copy link
Contributor

dgozman commented Aug 7, 2023

Folding into #2973.

@dgozman dgozman closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants