Back to Content

Permissions-Policy: display-capture directive

files/en-us/web/http/reference/headers/permissions-policy/display-capture/index.md

latest1.2 KB
Original Source

{{SeeCompatTable}}

The HTTP {{HTTPHeader("Permissions-Policy")}} header display-capture directive controls whether or not the document is permitted to use Screen Capture API, that is, {{domxref("MediaDevices.getDisplayMedia", "getDisplayMedia()")}} to capture the screen's contents.

If display-capture is disabled in a document, the document will not be able to initiate screen capture via {{domxref("MediaDevices.getDisplayMedia", "getDisplayMedia()")}} and will throw a NotAllowedError exception.

Syntax

http
Permissions-Policy: display-capture=<allowlist>;
  • <allowlist>

Default policy

The default allowlist for display-capture is self.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also