Reputation: 169
At the moment google chrome provides me with security for using my device webcam, with a prompt '.. wants to use your camera' allow/deny. each time I load a page i get this option. I'm trying use the camera embedded within my google chrome app
Is there a way to make sure that once user says 'allow' the value is retrieved and user will not have to give access for that particular app.
Is there any API I could use where 'allow' or 'deny click is stored and sent back to the app so that i can do some modifications accordingly.
I cant reproduce that using my chrome browser though. I dont get any prompt for the user to allow/deny.But, client is getting this prompt and are not happy with prompt each time app tries to access camera
Upvotes: 1
Views: 10851
Reputation: 503
One solution is to launch your browser in command line by using the use-fake-ui-for-media-stream property.
start chrome "http://localhost" --use-fake-ui-for-media-stream
More informations about Linux and Mac command line instructions here: https://creativcoders.wordpress.com/2014/08/18/chrome-always-allow-access-to-webcam-and-microphone-over-http-webrtc/
Upvotes: 1
Reputation: 24119
If you're talking about Chrome Packaged apps, you can use the "audioCapture" and "videoCapture" permissions in the manifest. No infobar prompt will appear if you include those.
https://github.com/GoogleChrome/chrome-app-samples/blob/master/camera-capture/manifest.json#L14
If you're writing a normal web app hosted on a web server, than the only way around the infobar prompt is to run the sight over SSL (https). In that case, users will only be prompted once. Subsequent uses of your app won't show the prompt if the user accepts the first time.
Upvotes: 4