简体   繁体   中英

is there a way to re-trigger video dialog in browser?

Lets say user has blocked access to camera and if I check it like this:

navigator.mediaDevices.getUserMedia({ audio: false, video: true })
  .then(function(stream) {
    // do something
  })
  .catch(function(err) {
    console.log(err)
  });

The exception is thrown as the camera is not allowed.

No not really. If so then sites would just keep asking for it which would annoy the user endlessly.

If the user denies this you'll have to show a message in your application that tells the user to go and enable it in their browser (which is a bit different for each browser).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM