Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--use-file-for-fake-audio-capture

What does --use-file-for-fake-audio-capture do?

Play a .wav file as the microphone. Note that for WebRTC calls we'll treat the bits as if they came from the microphone, which means you should disable audio processing (lest your audio file will play back distorted). The input file is converted to suit Chrome's audio buses if necessary, so most sane .wav files should work. You can pass either <path> to play the file looping or <path>%noloop to stop after playing the file to completion. Must also be used with kDisableAudioInput or kUseFakeDeviceForMediaStream.

Usage

CLILaunch Chrome with --use-file-for-fake-audio-capture using CLI

chrome --use-file-for-fake-audio-capture

PuppeteerLaunch Chrome with --use-file-for-fake-audio-capture using Puppeteer

const browser = await puppeteer.launch({
  args: ['--use-file-for-fake-audio-capture']
});

PlaywrightLaunch Chrome with --use-file-for-fake-audio-capture using Playwright

const browser = await chromium.launch({
  args: ['--use-file-for-fake-audio-capture']
});

SeleniumLaunch Chrome with --use-file-for-fake-audio-capture using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--use-file-for-fake-audio-capture')

driver = webdriver.Chrome(options=options)