In my page I have three audio recorders. And when chrome asks permission to use the mic, it has the options: "allow", "block" and to close the permission popup.
If the use closes de popup, it appears other permission, and after that another (if the user repeats the action). One for each recorder.
Is there a way to show this only one time?
If you have multiple microphones or cameras, you can choose which one to use as the default device for chrome.
Follow these steps: Open Chrome -> settings -> Privacy and security -> Site Settings -> Microphone -> Choose the microphone you need to use
Open Chromium Edge -> settings -> cookies and site permissions -> Microphone -> Choose which microphone the browser can access
Or you can set whether to allow the use of the microphone for each website, through the site settings on this page.
As I was using react-media-recorder, I tried to see if it was a bug in the lib. And it happened that the recorder was asking permission on mounting.
I changed this to ask only when the user click to record.
So if anyone has the same problem (even if you don't use this lib) try the same thing.
Related
I have a Chrome extension that needs the "Read and change all your data" permission to work. Some users don't like this but I don't have any options to make the permissions more restrictive.
As a workaround, I noticed that if I create a new Chrome window, click the user profile in the top right then sign in to a new account, all my Chrome extensions disappear. If I then install my Chrome extension, it appears to only operate on that window.
Would I be correct in saying to users that if the "read and change..." permission makes them nervous, they could start a clean account in a new window and run the extension there because then it won't have access to any of your browsing data from your main account and window? Is there a link from Google anywhere that confirms this or any well known site that recommends this?
So I actually run Chrome Canary and use that for development with tens of developer specific extensions that all require very permissive permissions so I don't have to be so careful. If I could suggest the new window/account approach to users, that would be helpful.
I have made an application to record a video by following this steps : https://github.com/muaz-khan/RecordRTC,
I want access to allow the camera always 'allow',
i've tried bypass the allow permission in popup allow webcam use start chrome --use--fake-ui--for--media-stream and it's work for me, but when i closed my chrome and then i opened chrome again , the popup permission allow webcam still showing,
what's the solution?
If you serve your application from an https domain, Chrome will remember the user's answer to the permissions dialog after the first use, so if they use it once, permission is granted (they click "allow"), the next time they use it, permission will be granted automatically and they won't be shown the pop up again.
Chrome has recently released an update to its media settings which prompts a user to grant permission to a site allowing access to his/her microphone and camera. Is there a way to detect these settings in Javascript?
I have a flash player (which will eventually be HTML5 based) with microphone functionality. The player is currently set up with a friendly tutorial on how to grant permission before starting the session. However, since Chrome released the update, the flash player and Chrome permissions are conflicting causing an error in the flash until the user has allowed/denied the Chrome settings prompt. What I'd like to do, until the player is moved to HTML5, is detect if the browser is Chrome (with appropriate version) and if the user's settings aren't set to then show additional tutorial screen.
Couple things:
This is specific to Chromes implementation so you can not tell what permissions the user has granted unless Chrome supplies that information to your app. I.E. there is no API you can query for this info.
It's not even something that Chrome stores. If you look under the advanced settings tab on this page, you will see that its on a per app basis not a one time thing. Chrome will only remember what permission was granted for a specific application if that app asks for the permission over https. If it asks for it over http then it will forget what permissions were granted.
Your best bet (though by no means full-proof) is to sniff out the browser agent and version. For one of the better implementations of this see here.
You will want to specifically look for Chrome and any version >= 21. (21 was the version that introduced the getMediaApi). Then it's a simple if check:
if (version >= 21){
//ask permission though the getMediaApi
} else{
//ask permission though flash
}
i stumbled into an approach for this that works fairly well, and doesn't require cookies (people can change these settings out-of-band, so the cookie can become incorrect), or for Chrome to provide an ounce of help (it doesn't).
if (chrome) {
var madeMicDecision = false;
navigator.getUserMedia({whatever},
function(stream) {
madeMicDecision = true;
//close the stream, move to the next page
//they have either just granted permission, or have in the past and it's remembered
},
function(error) {
madeMicDecision = true;
//go to error handling page
//the error handling page should describe going to chrome://settings/contentExceptions#media-stream
//or how to allow the user media via clicking on the crossed out camera icon in the 'wonderbar'
}
}
But we also want to show the tutorial screen - the above code will pop the chrome infobox if the permission setting isn't remembered. But without permission events from chrome, or an API to query permissions, how do we know when to show the chrome+infobox tutorial content?
My trick was to show the content automatically, but only after a delay. People who have accepted or denied permissions previously would never see this content, because our success/error handler would have moved them on before the delay. So, give the getUserMedia call a moment to detect/react - if the browser hasn't moved on, it's time to show the help content.
setTimeout(function() {
if (!madeMicDescision) {
//display chrome/infobox/getUserMedia permissions help content
}
}, 2000);
Not perfect (bizarre and sad really), but seems to work for the most common cases.
I cloned a project about real-time image processing on a web browser from this link:
Then I could not allow my browser to access my camera.
I got this javascript alert:
Uh-oh, the webcam didn't start. Do you have a webcam? Did you give it
permission? Refresh to try again.
And the allow button is not shown as if I access his site.
To ignore Chrome’s secure origin policy, follow these steps.
Navigate to chrome://flags/#unsafely-treat-insecure-origin-as-secure in Chrome.
Find and enable the Insecure origins treated as secure section (see below).
Add any addresses you want to ignore the secure origin policy for. Remember to include the port number too (if required).
Save and restart Chrome.
I found solution from below link.Hope it will help to someone
https://medium.com/#Carmichaelize/enabling-the-microphone-camera-in-chrome-for-local-unsecure-origins-9c90c3149339
Are you accessing the webpage that is served over HTTP, on localhost? If you are accessing it from http://localhost/... , Chrome will ask for your permission to use the camera.
If you are opening the web page directly, i.e. /Users/Methuz/Documents/index.html then it will not work, even if you explicitly allows it permission
In this case, the workaround I use is to host the HTML file on a webserver. A quick hack is to use python, in the folder where the HTML page is lcoated: python -m SimpleHTTPServer
Step 1:
Find your chrome preferences file:
http://www.forensicswiki.org/wiki/Google_Chrome#Configuration
Step 2:
Open it and Find the "profile" key
Step3:
Under profile there will be a "content_settings" hash, that will have a "pattern_pairs" hash
Add this to it:
"*,*": {
"media-stream-camera": 1
}
Final example:
"profile": {
....
"content_settings": {
....
"pattern_pairs": {
"*,*": {
"media-stream-camera": 1
},
....
}
}
}
WARNING: This will allow all websites access to your camera
Chrome now only allows https:// servers to persistent list (version 39.xx)
https://support.google.com/chrome/answer/2693767?hl=en
Allow: This allows the site to access your camera and microphone at this time and a notification will appear confirming that you’ve granted access. If you select Allow on a "http" URL your preference will not be remembered in future visits. If you select Allow on a "https" URL, your preference will be remembered in future visits.
Maybe this link helps to set your local secure server if you are using Wamp.
http://forum.wampserver.com/read.php?2,32986
Then you can add your local server to persistent allow list of chrome.
Got this problem for days, only this helped:
Reinstall Chrome by removing configuration as well. And try not to sync all the extensions, as they may interfere.
sudo apt-get purge google-chrome-stable
rm -rf ~/.config/google-chrome
Then install from official.
Another solution is to use iframe tag. Jest deploy your page on server (localhost or external) and include it in your local html.
Example:
<iframe src="http://localhost/your_project/index.html"></iframe>
Chrome on HTTP or any other port won't save the preference of Camara share choice.
To save the selection you will need to run on HTTPs, even if you don't have SSL certificate on localhost that fine. Just add https before the localhost url and it will ask you its unsafe, if you want to proceed add it as an exception under Advance options. Do that and then Chrome will save you camera sharing preference for this website. and won't ask you to select allow
You can choose a different default permission setting and manage exceptions in Content settings.
Click the Chrome menu Chrome menu on the browser toolbar.
Select Settings.
Click Show advanced settings.
In the "Privacy" section, click Content settings.
In the "Media" section:
* Ask me when a site requires access to my camera and microphone: Select this option if you want Chrome to alert you whenever a site requests access to your camera and microphone.
* Do not allow sites to access my camera and microphone: Select this option to automatically deny any site requests to access your camera and microphone.
Or click Manage exceptions to remove previously-granted permissions for specific sites.
Source: https://support.google.com/chrome/answer/2696491?hl=en
P/D: the link you provided has an error. I can't access.
Open localhost/webcam.swf
then right click on the flash file then allow the webcam and tick remember
that will add exception for localhost
I'm trying to use the new HTML notification API...
I'm still stuck in the request authorization phase;
when user click on a button it's executed the function:
// this is all inside a click handler
var fn = console.info;
window.Notification.requestPermission(function(grant) {
fn(grant);
});
When i tryed this for the first time in chrome, a chrome's message came out asking me if i want to concede the Notification grant to my localhost web site... I said no (just to test even this case). Then I tried again, but that message from chrome never came out.
My question:
If the user change opinion about notification, how could enable notification for a website?
Maybe do I've to change something in the chrome settings?
Thanks in advance
You can manage and re-allow notifications in Chrome by going to Settings -> Privacy -> Content Settings -> Scroll down to Notifications - here you can manage which sites are allowed to show notifications and which are not.
Update:
As mentioned by #ivan_vaz in the comments, it is also possible to configure this as well as other permissions by clicking the favicon of the website in the address/navigation bar.