Webcam/Video access permission denied

Hello!

I’m trying to use the <video> element to access my webcam video stream, but I’m having troubles with the permissions.

Here’s the error message:

VideoCapture permission has been blocked because of a Feature Policy applied to the current document.  See [https://goo.gl/EuHzyv](https://goo.gl/EuHzyv) for more details.

From my (limited) understanding of the provided link this is due to some CORS-related restrictions.

A suggested workaround is the use of allow="camera" attribute in an iframe tag, but I can’t make it work regardless.

I’ve searched around the forum and the public notebooks but haven’t come across any example for accessing the webcam. This is issue might be the closest I’ve found: https://talk.observablehq.com/t/iframe-sandbox-attribute/193/7

Any ideas?

Thank you in advance!

Thanks for the bug report!

Per your link to the Chromium change, we’ve added:

allow="geolocation; microphone; camera; midi; encrypted-media"

to our notebook <iframe> tags.

Webcam video permissions should now work properly. Here’s quick example: https://beta.observablehq.com/@jashkenas/webcam-demo-for-the-forums

Let me know if it’s giving you any trouble.

Cheers,
Jeremy

Whoohoo! Works like a charm now.

Thank you for the quick response as well.

Cheers!