2023-11-11 00:35:47 +08:00
|
|
|
const path = require('path');
|
|
|
|
|
2022-08-27 03:13:56 +08:00
|
|
|
const chromiumConfig = {
|
|
|
|
name: 'Chromium',
|
|
|
|
use: {
|
|
|
|
browserName: 'chromium',
|
|
|
|
launchOptions: {
|
|
|
|
args: [
|
|
|
|
'--no-sandbox',
|
|
|
|
'--ignore-certificate-errors',
|
|
|
|
'--use-fake-ui-for-media-stream',
|
|
|
|
'--use-fake-device-for-media-stream',
|
|
|
|
'--allow-file-access-from-files',
|
2023-11-11 00:35:47 +08:00
|
|
|
`--use-file-for-fake-video-capture=${path.join(__dirname, 'media/video.y4m')}`,
|
2022-08-27 03:13:56 +08:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const firefoxConfig = {
|
|
|
|
name: 'Firefox',
|
|
|
|
use: {
|
|
|
|
browserName: 'firefox',
|
|
|
|
launchOptions: {
|
|
|
|
args: [
|
|
|
|
'--quiet',
|
|
|
|
'--use-test-media-devices',
|
|
|
|
],
|
|
|
|
firefoxUserPrefs: {
|
|
|
|
"media.navigator.streams.fake": true,
|
|
|
|
"media.navigator.permission.disabled": true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const webkitConfig = {
|
|
|
|
name: 'WebKit',
|
|
|
|
use: {
|
|
|
|
browserName: 'webkit',
|
|
|
|
launchOptions: {
|
|
|
|
args: [
|
|
|
|
'--no-sandbox',
|
|
|
|
'--use-fake-ui-for-media-stream',
|
|
|
|
'--use-fake-device-for-media-stream',
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.chromiumConfig = chromiumConfig;
|
|
|
|
exports.firefoxConfig = firefoxConfig;
|
|
|
|
exports.webkitConfig = webkitConfig;
|