Accessing System Micrcophone Without Tabs

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.

Accessing System Micrcophone Without Tabs

Postby netdzynr » Tue Nov 17, 2015 12:42 pm

Anyone know if it's possible to enable microphone support in a CEF browser using Javascript or some other other option? Chrome browser relies on a small Allow/Block popup to enable (or prohibit) mic access in the current tab. Is there any way to provide this same functionality when CEF doesn't have tabs?

Thanks for any suggestions.
netdzynr
Newbie
 
Posts: 1
Joined: Tue Nov 17, 2015 12:28 pm

Re: Accessing System Micrcophone Without Tabs

Postby PolesApart » Wed Nov 18, 2015 8:19 am

I guess you need something like:
Code: Select all
OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line)
{
    command_line->AppendSwitch("enable-media-stream");
}


and in JavaScript you use getUserMedia(). There probably is some CEF callback API for authorization, but I didn't check. If there is one, you probably must override it. It's most likely a function where you either return true/false or passes a callback for you to asynchronously confirm/deny the request (that's the CEF most common authorization callback).
PolesApart
Mentor
 
Posts: 73
Joined: Fri Dec 05, 2014 1:24 pm


Return to Support Forum

Who is online

Users browsing this forum: Biohazard, finder2, Google [Bot] and 60 guests