Skip to content

Commit 006ba9c

Browse files
committed
[[ Bug 23030 ]] Enable WebRTC on CEF browser
This patch appends the command line switch 'enable-media-stream' when launching an instance of the CEF browser, and this enables WebRTC.
1 parent 9124ff4 commit 006ba9c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/notes/bugfix-23030.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Enable WebRTC on CEF browser

libbrowser/src/libbrowser_cef.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ class MCCefBrowserApp : public CefApp, CefBrowserProcessHandler
296296
if (MCCefPlatformGetHiDPIEnabled())
297297
p_command_line->AppendSwitch(MC_CEF_HIDPI_SWITCH);
298298
}
299+
300+
virtual void OnBeforeCommandLineProcessing(const CefString &p_process_type, CefRefPtr<CefCommandLine> p_command_line) OVERRIDE
301+
{
302+
// Enable WebRTC
303+
p_command_line->AppendSwitch("enable-media-stream");
304+
}
299305

300306
IMPLEMENT_REFCOUNTING(MCCefBrowserApp);
301307
};

0 commit comments

Comments
 (0)