My sample getUserMedia() asks for permission for the camera and microphone.
let constraints = { audio: true, video: true };
navigator.mediaDevices.getUserMedia(constraints).then(stream => {
// Do stuff
}).catch(e => alert(`getUserMedia error ${e.name}`))
If the user doesn't accept the camera and/or microphone permission request I get an alert error as expected.
Is it possible to still ask for audio and video, but if the user refuses, then their devices won't be used but, would still allow the user to browse the site?
Thank you.