Camera and microphone access fails with NotAllowedError

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Camera and microphone access fails with NotAllowedError

Postby tadas » Wed Mar 08, 2017 5:27 pm

Hi there,

I have tried to use CEF for testing with https://appr.tc , but whenever I press join I get error: "Failed to get access to local media. Error name was NotAllowedError." . I can use this site with Chrome originally. I have added these lines to CefSharp.Wpf:

Code: Select all
CefSettings settings = new CefSettings();
        settings.CefCommandLineArgs.Add("enable-media-stream", "1");
            settings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream", "1");
            settings.CefCommandLineArgs.Add("enable-speech-input", "1");
            settings.CefCommandLineArgs.Add("enable-usermedia-screen-capture", "1");

            if (!Cef.IsInitialized && !Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null))
            {
                throw new InvalidOperationException("Cef::Initialize() failed");
            }


I have used Cef on 52 version and it worked great with these flags. Anyone know what was changed since then?

Thanks in advance!
tadas
Newbie
 
Posts: 4
Joined: Wed Mar 08, 2017 5:21 pm

Re: Camera and microphone access fails with NotAllowedError

Postby magreenblatt » Wed Mar 08, 2017 5:59 pm

What CEF version are you using now?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Camera and microphone access fails with NotAllowedError

Postby tadas » Wed Mar 08, 2017 6:17 pm

magreenblatt wrote:What CEF version are you using now?


Currently cef,sdk is 3.2883.1554 version.
tadas
Newbie
 
Posts: 4
Joined: Wed Mar 08, 2017 5:21 pm

Re: Camera and microphone access fails with NotAllowedError

Postby tadas » Thu Mar 09, 2017 6:07 am

I need to apologize, I have found that I have put these lines in wrong project. Removing the comment from enable-media-stream in CefSharp.Example project solved everything. Thank you.
tadas
Newbie
 
Posts: 4
Joined: Wed Mar 08, 2017 5:21 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 82 guests