I have a modal dialog box in my application which uses getUserMedia
to display a video from the user's camera. This causes a "Deny/Allow" bar to appear. Let's say that the user closes the dialog before clicking "Deny" or "Allow". The bar remains, even though the elements that would be using it have disappeared.
Is there a way to notify the browser that it can hide the permission request even though the user never interacted with it?
When the user closes your dialog box, reload the page to clear the permission request with:
location.reload();
I've tested this in Firefox and Chrome 41 (Canary) and it works there.
Caveat: Chrome 39 (the current version as of this writing) appears to have a bug where this doesn't work so well. The first time I navigate to the page it wont work, but after refreshing the page manually once, it starts working.
I realize this answer may not be immediately useful, but once Chrome 41 ships it should work.
There's currently no way to clear the permission prompt without reloading the page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With