Skip to content

Commit bcd3559

Browse files
Adding fake video file as fake video capture input and use it in chrome.
1 parent 0a61d1f commit bcd3559

File tree

2 files changed

+29400
-17
lines changed

2 files changed

+29400
-17
lines changed

playwright.config.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import { defineConfig, devices } from "@playwright/test";
2-
3-
/**
4-
* Read environment variables from file.
5-
* https://github.com/motdotla/dotenv
6-
*/
7-
// import dotenv from 'dotenv';
8-
// dotenv.config({ path: path.resolve(__dirname, '.env') });
2+
import * as path from "path";
93

104
/**
115
* See https://playwright.dev/docs/test-configuration.
@@ -40,11 +34,12 @@ export default defineConfig({
4034
...devices["Desktop Chrome"],
4135
launchOptions: {
4236
args: [
43-
"--disable-web-security",
44-
"--enable-web-rtc",
45-
"--headless=chrome",
46-
// "--use-fake-device-for-media-stream",
47-
// "--use-fake-ui-for-media-stream"
37+
// "--disable-web-security",
38+
// "--enable-web-rtc",
39+
// "--headless=chrome",
40+
"--use-fake-device-for-media-stream",
41+
// "--use-fake-ui-for-media-stream",
42+
`--use-file-for-fake-video-capture=${path.join(__dirname, './tests/video-src/small.y4m')}`,
4843
],
4944
},
5045
contextOptions: {
@@ -77,11 +72,6 @@ export default defineConfig({
7772
},
7873
},
7974
},
80-
contextOptions: {
81-
/* Camera permission */
82-
permissions: ["indexedDB"],
83-
ignoreHTTPSErrors: true,
84-
},
8575
},
8676
// {
8777
// name: "webkit",

0 commit comments

Comments
 (0)