Ver Fonte

Enable media stream on Windows

JoshEngebretson há 9 anos atrás
pai
commit
3ba811a98a

+ 3 - 0
Source/AtomicWebView/Internal/WebAppBrowser.cpp

@@ -35,6 +35,9 @@ WebAppBrowser::WebAppBrowser()
 
 void WebAppBrowser::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line)
 {
+    command_line->AppendSwitch("--enable-media-stream");
+    command_line->AppendSwitch("--enable-usermedia-screen-capturing");
+
     CefApp::OnBeforeCommandLineProcessing(process_type, command_line);
 }
 

+ 3 - 6
Source/AtomicWebView/WebBrowserHost.cpp

@@ -114,13 +114,10 @@ WebBrowserHost::WebBrowserHost(Context* context) : Object (context)
 #endif
 
 
-    // IMPORTANT: Cef::App contains virtual void OnBeforeCommandLineProcessing(), which should make it possible
-    // to setup args on Windows
+    // IMPORTANT: See flags being set in implementation of void WebAppBrowser::OnBeforeCommandLineProcessing
+    // these include "--enable-media-stream", "--enable-usermedia-screen-capturing"
 
-#ifdef ATOMIC_PLATFORM_OSX
-    const char* _argv[3] = { "", "--enable-media-stream", "--enable-usermedia-screen-capturing" };
-    CefMainArgs args(3, (char**) &_argv);
-#elif ATOMIC_PLATFORM_LINUX
+#ifdef ATOMIC_PLATFORM_LINUX
     static const char* _argv[3] = { "AtomicWebView", "--disable-setuid-sandbox", "--off-screen-rendering-enabled" };
     CefMainArgs args(3, (char**) &_argv);
 #else