AudioDecoder: 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 AudioDecoder trả về một Promise được hoàn tất sau khi mọi thông điệp đang chờ trong hàng đợi đã được hoàn tất.
Cú pháp
js
flush()
Tham số
Không có.
Giá trị trả về
Một Promise được hoàn tất với undefined.
Ngoại lệ
Nếu xảy ra lỗi, promise sẽ được hoàn tất với một trong các ngoại lệ sau:
InvalidStateErrorDOMException-
Được trả về nếu Promise bị từ chối vì
statekhông phải làconfigured.
Ví dụ
Ví dụ sau flush AudioDecoder.
js
await audioDecoder.flush();
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-audiodecoder-flush> |