Page 1 of 1

CEF accessing camera without user permission

PostPosted: Mon Jul 05, 2021 8:15 am
by ramjana
Hi Experts,

I have a windows application(C++) where I am creating a browser instance. OnBeforeCommandLineProcessing, I am enabling media stream.
command_line->AppendSwitch("--enable-media-stream");

With this I am able to access the camera and mic from the browser instance.
Browser.png
Browser.png (475.46 KiB) Viewed 2706 times


What I notice here though is that before accessing the camera/mic, CEF is not asking for user's permission to access the same.

Is there a way CEF prompts user for permission before accessing camera/mic like how it works in chrome browser?
Chrome browser.png
Chrome browser.png (102.04 KiB) Viewed 2706 times


Kindly suggest,
Thanks!

Re: CEF accessing camera without user permission

PostPosted: Mon Jul 05, 2021 8:29 am
by magreenblatt
This is only supported by the Chrome runtime currently. You can also follow https://bitbucket.org/chromiumembedded/ ... dia-access