this code works fine in any page. but doesn't work with extension. is any solution to work around
navigator.mediaDevices.getUserMedia({video: true})
.then(mediaStream => {
const track = mediaStream.getVideoTracks()[0];
imageCapture = new ImageCapture(track);
})
.catch(error);
You need to allow your browser to access to your webcam (and mic). Useful link: https://support.google.com/chrome/answer/2693767?hl=en