Permissions-Policy: camera
HTTP Permissions-Policy
标头当中的 camera
指令控制着当前的文档是否允许使用视频输入设备。当该策略被开启时,由 MediaDevices.getUserMedia()
返回的 Promise
将会以一个 NotAllowedError
DOMException
拒绝。
语法
http
Permissions-Policy: camera=<allowlist>;
- <allowlist>
-
允许使用此特性的来源(origin)列表。参见
Permissions-Policy
。
默认策略
默认允许的 camera
列表为 'self'
。
规范
Specification |
---|
Media Capture and Streams # permissions-policy-integration |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
camera |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.