Permissions-Policy: chỉ thị picture-in-picture

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Chỉ thị picture-in-picture của header HTTP Permissions-Policy kiểm soát việc tài liệu hiện tại có được phép phát video ở chế độ Picture-in-Picture hay không.

Cụ thể, khi một chính sách đã được xác định chặn việc sử dụng tính năng này, các lần gọi HTMLVideoElement.requestPictureInPicture() sẽ ném một DOMException kiểu SecurityError.

Cú pháp

http
Permissions-Policy: picture-in-picture=<allowlist>;
<allowlist>

Danh sách các nguồn gốc được cấp quyền sử dụng tính năng. Xem Permissions-Policy > Cú pháp để biết thêm chi tiết.

Chính sách mặc định

Danh sách cho phép mặc định cho picture-in-picture*.

Thông số kỹ thuật

Specification
Picture-in-Picture
# permissions-policy

Tương thích trình duyệt

Xem thêm