CefView / QCefView

A Qt Widget encapsulated CEF view based on QWidget
https://cefview.github.io/QCefView/
GNU Lesser General Public License v2.1
521 stars 137 forks source link

[BUG]: 不能正常加载摄像头数据 #280

Closed bigcwu closed 1 year ago

bigcwu commented 1 year ago

Describe the bug 【Bug描述】

  1. 我在main函数中和添加如下代码 config.addCommandLineSwitch("enable-system-flash"); // flash config.addCommandLineSwitch("enable-speech-input"); //语音输入 config.addCommandLineSwitch("enable-media-stream"); config.addCommandLineSwitch("disable-gpu"); config.addCommandLineSwitch("ignore-certificate-errors"); config.addCommandLineSwitch("enable-usermedia-screen-capturing"); config.addCommandLineSwitch("enable-experimental-web-platform-features"); 程序不能正常加载摄像头的视频流“https://vvclass.shinevv.com/?s=eyJyb29tX2lkIjoiMTA0NDk1IiwgInBhc3N3b3JkIjoiMjIyMjIyMjIiLCAibmlja05hbWUiOiLmiJHmmK%2FlsI%2Fnmb0iIH0%3D

  2. 另外我在CefViewBrowserApp::OnBeforeCommandLineProcessing函数添加如下代码也不生效: command_line->AppendSwitch("enable-system-flash"); // flash command_line->AppendSwitch("enable-speech-input"); //语音输入 command_line->AppendSwitch("enable-media-stream"); command_line->AppendSwitch("disable-gpu"); command_line->AppendSwitch("ignore-certificate-errors"); command_line->AppendSwitch("enable-usermedia-screen-capturing"); command_line->AppendSwitch("enable-experimental-web-platform-features");

To Reproduce 【复现步骤】

  1. 我在cefSimple中用如下代码进行测试可以正常打开摄像头 void SimpleApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line) { command_line->AppendSwitch("enable-system-flash"); // flash command_line->AppendSwitch("enable-speech-input"); //语音输入 command_line->AppendSwitch("enable-media-stream"); command_line->AppendSwitch("disable-gpu"); command_line->AppendSwitch("ignore-certificate-errors"); command_line->AppendSwitch("enable-usermedia-screen-capturing"); command_line->AppendSwitch("enable-experimental-web-platform-features"); } Expected behavior 【正确的预期行为】

...

Screenshots 【截图】

...

Environment 【BUG产生的环境】

Additional context 【更多额外信息】

...

tishion commented 1 year ago

前端获取设备的方法有问题吧,标准被WebRTC页面都是没问题的