Permissions-Policy: camera directive
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
The HTTPPermissions-Policy headercamera directive controls whether the current document is allowed to usevideo input devices.
Specifically, where a defined policy blocks use of this feature,MediaDevices.getUserMedia() calls will return aPromise that rejects with aNotAllowedErrorDOMException.
In this article
Syntax
http
Permissions-Policy: camera=<allowlist>;<allowlist>A list of origins for which permission is granted to use the feature. See
Permissions-Policy> Syntax for more details.
Default policy
The default allowlist forcamera isself.
Specifications
| Specification |
|---|
| Media Capture and Streams> # permissions-policy-integration> |