Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reprompt for permissions with getUserMedia() after initial denial

navigator.permissions.query({name: 'microphone'})
 .then((permissionObj) => {
  console.log(permissionObj.state);
 })
 .catch((error) => {
  console.log('Got error :', error);
 })

 navigator.permissions.query({name: 'camera'})
 .then((permissionObj) => {
  console.log(permissionObj.state);
 })
 .catch((error) => {
  console.log('Got error :', error);
 })
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reprompt #permissions #initial #denial
ADD COMMENT
Topic
Name
2+5 =