CEF 摄像头和音频支持 WebRTC

问题描述

我想问一下,在Android和iOS上,CEF版本3.3071.1611是否可以通过WebRTC激活摄像头和音频。 我使用 UnrealEngine 并希望找到一种方法来通过该应用程序创建这样的聊天。我的 C++ 知识并不丰富。这就是为什么我在投入数小时的时间使其成为可能之前询问的原因。

信息:
版本:CEF 3.3071.1611
使用 Source Engine 4.26 构建
测试:https://test.webrtc.org/
返回:“无法访问您计算机的摄像头和麦克风(NotAllowedError)”

到目前为止我尝试过的:

#if WITH_CEF3
// The FWebbrowserSingleton must be initialized on the game thread
check(IsInGameThread());

// Provide CEF with command-line arguments.
#if PLATFORM_WINDOWS
CefMainArgs MainArgs(hInstance);
#else
CefMainArgs MainArgs;
#endif

bool bVerboseLogging = FParse::Param(FCommandLine::Get(),TEXT("cefverbose")) || FParse::Param(FCommandLine::Get(),TEXT("debuglog"));
// CEFbrowserApp implements application-level callbacks.
CEFbrowserApp = new FCEFbrowserApp;

CefRefPtr<CefCommandLine> cef_commandLine = CefCommandLine::CreateCommandLine();
cef_commandLine->AppendSwitchWithValue("use-fake-ui-for-media-stream","1");
cef_commandLine->AppendSwitchWithValue("enable-media-stream","1");
cef_commandLine->AppendSwitchWithValue("enable-usermedia-screen-capture","1");
cef_commandLine->AppendSwitchWithValue("enable-speech-input","1");

FCommandLine::Append(TEXT("--enable-media-stream=1 --use-fake-ui-for-media-stream=1 --enable-speech-input=1 --enable-usermedia-screen-capture=1"));


CEFbrowserApp->OnRenderProcessthreadCreated().BindRaw(this,&FWebbrowserSingleton::HandleRenderProcessCreated);

// Specify CEF global settings here.
CefSettings Settings;
Settings.no_sandBox = false;
Settings.command_line_args_disabled = false;

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)