Skip to content

Commit cd35b12

Browse files
committed
fix browser params
1 parent 0a00e37 commit cd35b12

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/session.ts

+13-9
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ export class Session extends EventEmitter {
548548
getBrowserArgs(): string[] {
549549
// https://peter.sh/experiments/chromium-command-line-switches/
550550
// https://source.chromium.org/chromium/chromium/src/+/main:testing/variations/fieldtrial_testing_config.json;l=8877?q=%20fieldtrial_testing_config.json&ss=chromium
551-
let args = [
551+
const args = [
552552
'--no-sandbox',
553553
'--no-zygote',
554554
'--ignore-certificate-errors',
@@ -587,34 +587,38 @@ export class Session extends EventEmitter {
587587

588588
if (this.videoPath) {
589589
log.debug(`${this.id} using ${this.videoPath} as fake source`)
590-
args.push(`--use-file-for-fake-video-capture=${this.videoPath.video}`)
591-
args.push(`--use-file-for-fake-audio-capture=${this.videoPath.audio}`)
590+
args.push(
591+
`--use-file-for-fake-video-capture=${this.videoPath.video}`,
592+
`--use-file-for-fake-audio-capture=${this.videoPath.audio}`,
593+
)
592594
}
593595

594596
if (this.enableGpu) {
595-
args = args.concat([
596-
'--enable-features=VaapiVideoDecoder',
597+
args.push(
598+
'--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL',
597599
'--ignore-gpu-blocklist',
598600
'--enable-gpu-rasterization',
599601
'--enable-zero-copy',
600602
'--disable-gpu-sandbox',
601603
'--enable-vulkan',
602-
])
604+
)
603605
if (this.enableGpu === 'egl') {
604606
args.push('--use-gl=egl')
607+
} else {
608+
args.push('--use-gl=angle', '--use-angle=vulkan')
605609
}
606610
} else {
607-
args = args.concat([
611+
args.push(
608612
// Disables webgl support.
609613
'--disable-3d-apis',
610614
'--disable-site-isolation-trials',
611615
// '--renderer-process-limit=2',
612616
// '--single-process',
613-
])
617+
)
614618
}
615619

616620
if (this.enableBrowserLogging) {
617-
args = args.concat(['--enable-logging=stderr', '--vmodule=*/webrtc/*=1'])
621+
args.push('--enable-logging=stderr', '--vmodule=*/webrtc/*=1')
618622
}
619623

620624
return args

0 commit comments

Comments
 (0)