Chrome浏览器默认开启摄像头访问权限

xingyun86 2023-7-10 1131

Chrome浏览器默认开启摄像头访问权限

虚拟声卡:

VB-Audio Virtual Apps

虚拟摄像机:

VCam 虚拟摄像头 - E2ESOFT

1.手动开启:

chrome://flags/#unsafely-treat-insecure-origin-as-secure

2.配置文件开启:

chrome.exe --unsafely-treat-insecure-origin-as-secure="https://www.baidu.com/" --user-data-dir="D:\Tmp"

CefSettings settings = new CefSettings();
settings.Locale = "zh-CN";
settings.CefCommandLineArgs.Add("enable-media-stream", "1");  //开启摄像头
settings.CefCommandLineArgs.Add("enable-system-flash", "1");  //flash
settings.CefCommandLineArgs.Add("enable-speech-input", "1");  //语音输入
settings.CefCommandLineArgs.Add("touch-events","enabled");
settings.CefCommandLineArgs.Add("disable-usb-keyboard-detect", "1");
settings.CefCommandLineArgs.Add("touch-devices", "enabled");
settings.CefCommandLineArgs.Add("touch-view", "enabled");
//安全证书            
settings.CefCommandLineArgs.Add("--ignore-urlfetcher-cert-requests", "1");
settings.CefCommandLineArgs.Add("--ignore-certificate-errors", "1")
settings.CefCommandLineArgs.Add("unsafely-treat-insecure-origin-as-secure", "https://*/");
settings.CefCommandLineArgs.Add("--ignore-urlfetcher-cert-requests", "1");
settings.CefCommandLineArgs.Add("--ignore-certificate-errors", "1");
settings.CefCommandLineArgs.Add("enable-media-stream", "1");
settings.CefCommandLineArgs.Add("disable-gpu", "1");
Cef.Initialize(cefSettings, performDependencyCheck: false, browserProcessHandler: null);


×
打赏作者
最新回复 (0)
查看全部
全部楼主
返回