Chrome Flags Reference

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

--use-fake-ui-for-media-stream

What does --use-fake-ui-for-media-stream do?

Bypass the media stream infobar by selecting the default device for media streams (e.g. WebRTC). Works with --use-fake-device-for-media-stream. Prefer --auto-accept-camera-and-microphone-capture which does not interact with screen/tab capture.

Usage

CLILaunch Chrome with --use-fake-ui-for-media-stream using CLI

chrome --use-fake-ui-for-media-stream

PuppeteerLaunch Chrome with --use-fake-ui-for-media-stream using Puppeteer

const browser = await puppeteer.launch({
  args: ['--use-fake-ui-for-media-stream']
});

PlaywrightLaunch Chrome with --use-fake-ui-for-media-stream using Playwright

const browser = await chromium.launch({
  args: ['--use-fake-ui-for-media-stream']
});

SeleniumLaunch Chrome with --use-fake-ui-for-media-stream using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--use-fake-ui-for-media-stream')

driver = webdriver.Chrome(options=options)

Build Conditions

LOAD_WEBUI_FROM_DISK