VideoEncoder: phương thức reset()
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 reset() của giao diện VideoEncoder đồng bộ hủy tất cả các lần mã hóa và callback đang chờ, giải phóng tất cả tài nguyên bên dưới và đặt state thành "unconfigured".
Sau khi gọi reset(), phải gọi configure() trước khi tiếp tục các lần gọi encode().
Cú pháp
js
reset()
Tham số
Không có.
Giá trị trả về
Không có (undefined).
Ngoại lệ
InvalidStateErrorDOMException-
Ném ra nếu
statelà"closed".
Ví dụ
Ví dụ sau đây đặt lại VideoEncoder.
js
VideoEncoder.reset();
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-videoencoder-reset> |