Is it possible to customize the native browser permissions dialog?

Asked

Viewed 40 times

1

Can anyone tell me how I can (if it is possible) manipulate via JS the authorization notification to activate the client browser microphone?

My goal is not to access without the user’s permission (this should certainly not be possible), but to improve the box that displays the message. I would like to increase and make clear because I am developing an application in which the microphone will have to be used and in the first tests I did, I noticed that the user often does not notice this notification and "skips" the step of authorizing the opening of the microphone.

print da notificação nativa

  • 3

    Being a native resource of browsers, I believe it will not be possible to change its appearance. But it would be a very interesting feature.

1 answer

2

There is no way to do this. This decision is intentional and extremely important for the safety of users.

Browsers are programs that execute arbitrary code on the user’s computer. And, depending on the functionalities that the executed code needs to perform, it is necessary to ask the user’s explicit permission.

This permission is granted by the user by a fully standardized interface that is part of the browser interface itself. All sites you visit look the same to maintain consistent experience.

This impossibility of customization is also important to prevent interfaces that induce user acceptance by omitting information about what is actually being requested. How would the browser validate that, in fact, the dialog of custom permission gives all the information for the user to make a conscious decision? The truth is that it is not possible to make this kind of determination, at least not efficiently with current technologies.

What you can do is, before requesting the user’s authorization by the browser interface, open a popup own (and custom) or show an arrow as an indicator, such as "please, below you will be asked to accept permissions for this interface to work".

Sites like Facebook do this and give a little more "fluidity", but the native interface is still there.

Demonstração do popover do Facebook

In this case, once I click "On" (it is barely visible in the image), the Facebook Javascript code calls the API that displays the native permission dialog.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.