Skip to content

Instantly share code, notes, and snippets.

@vitaliy-bobrov
Created June 11, 2019 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitaliy-bobrov/9fbe22ce20c7027613127d8fc350fa85 to your computer and use it in GitHub Desktop.
Save vitaliy-bobrov/9fbe22ce20c7027613127d8fc350fa85 to your computer and use it in GitHub Desktop.
// Getting permission status.
const micStatus = await navigator.permissions.query({name: 'microphone'});
console.log(micStatus); // state: "prompt"
// Reset permission to initial state.
await navigator.permissions.revoke({name: 'microphone'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment