VideoEncoder: thuộc tính state
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.
Thuộc tính chỉ đọc state của giao diện VideoEncoder trả về trạng thái hiện tại của codec bên dưới.
Giá trị
Một chuỗi chứa một trong các giá trị sau:
"unconfigured"-
Codec chưa được cấu hình để giải mã.
"configured"-
Codec có cấu hình hợp lệ và đã sẵn sàng.
"closed"-
Codec không còn có thể sử dụng được và tài nguyên hệ thống đã được giải phóng.
Ví dụ
Ví dụ sau đây in trạng thái của VideoEncoder ra console.
js
console.log(VideoEncoder.state);
Thông số kỹ thuật
| Specification |
|---|
| WebCodecs> # dom-videoencoder-state> |