@@ -548,7 +548,7 @@ export class Session extends EventEmitter {
548
548
getBrowserArgs ( ) : string [ ] {
549
549
// https://peter.sh/experiments/chromium-command-line-switches/
550
550
// 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 = [
552
552
'--no-sandbox' ,
553
553
'--no-zygote' ,
554
554
'--ignore-certificate-errors' ,
@@ -587,34 +587,38 @@ export class Session extends EventEmitter {
587
587
588
588
if ( this . videoPath ) {
589
589
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
+ )
592
594
}
593
595
594
596
if ( this . enableGpu ) {
595
- args = args . concat ( [
596
- '--enable-features=VaapiVideoDecoder' ,
597
+ args . push (
598
+ '--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL ' ,
597
599
'--ignore-gpu-blocklist' ,
598
600
'--enable-gpu-rasterization' ,
599
601
'--enable-zero-copy' ,
600
602
'--disable-gpu-sandbox' ,
601
603
'--enable-vulkan' ,
602
- ] )
604
+ )
603
605
if ( this . enableGpu === 'egl' ) {
604
606
args . push ( '--use-gl=egl' )
607
+ } else {
608
+ args . push ( '--use-gl=angle' , '--use-angle=vulkan' )
605
609
}
606
610
} else {
607
- args = args . concat ( [
611
+ args . push (
608
612
// Disables webgl support.
609
613
'--disable-3d-apis' ,
610
614
'--disable-site-isolation-trials' ,
611
615
// '--renderer-process-limit=2',
612
616
// '--single-process',
613
- ] )
617
+ )
614
618
}
615
619
616
620
if ( this . enableBrowserLogging ) {
617
- args = args . concat ( [ '--enable-logging=stderr' , '--vmodule=*/webrtc/*=1' ] )
621
+ args . push ( '--enable-logging=stderr' , '--vmodule=*/webrtc/*=1' )
618
622
}
619
623
620
624
return args
0 commit comments