VideoDecoder: phương thức flush()
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 Dedicated Web Workers.
Phương thức flush() của giao diện VideoDecoder trả về một Promise được giải quyết khi tất cả các thông điệp đang chờ trong hàng đợi đã hoàn thành.
Cú pháp
js
flush()
Tham số
Không có.
Giá trị trả về
Một Promise được giải quyết với undefined.
Ngoại lệ
InvalidStateErrorDOMException-
Được trả về nếu Promise bị từ chối vì
statekhông phải làconfigured.
Ví dụ
Ví dụ sau đây xả hàng đợi của VideoDecoder.
js
VideoDecoder.flush();
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-videodecoder-flush> |