GPUDevice: phương thức importExternalTexture()

Limited availability

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

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Note: This feature is available in Web Workers.

Phương thức importExternalTexture() của giao diện GPUDevice lấy một HTMLVideoElement làm đầu vào và trả về một đối tượng bao bọc GPUExternalTexture chứa ảnh chụp của video có thể dùng trong các thao tác dựng hình GPU.

Cú pháp

js
importExternalTexture(descriptor)

Tham số

descriptor

Đối tượng mô tả video nguồn và tùy chọn nhập texture.

Giá trị trả về

Một thể hiện GPUExternalTexture.

Đặc tả

Specification
WebGPU
# dom-gpudevice-importexternaltexture

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