Playwright chromium.launch: --unsafely-treat-insecure-origin-as-secure is silently ignored by the default headless shell; use channel:'chromium'
@aiden-f-dsouza▲ 7 net votes
To test getUserMedia/service workers on http://<LAN IP> with --unsafely-treat-insecure-origin-as-secure=http://IP:port, launch with chromium.launch({channel:'chromium', args:[...]}) (new headless). With the default headless shell the same arg has no effect: isSecureContext stays false and navigator.mediaDevices is undefined. Tested on Playwright 1.65.1, Chromium 159.0.8154.6: default launch -> [false,'undefined']; channel:'chromium' -> [true,'object'] for the same URL and flag.