WebTransport: thuộc tính congestionControl
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.
Thuộc tính chỉ đọc congestionControl của giao diện WebTransport cho biết ưu tiên của ứng dụng đối với thông lượng cao hoặc độ trễ thấp khi gửi dữ liệu.
Giá trị này được đặt trong WebTransport() constructor options.
Giá trị
Một chuỗi với một trong các giá trị sau:
default-
Tinh chỉnh kiểm soát tắc nghẽn mặc định cho transport. Đây là giá trị mặc định.
throughput-
Ứng dụng ưu tiên tinh chỉnh kiểm soát tắc nghẽn cho thông lượng.
low-latency-
Ứng dụng ưu tiên tinh chỉnh kiểm soát tắc nghẽn cho độ trễ thấp.
Ví dụ
Ví dụ này cho thấy cách lấy ưu tiên congestionControl.
Vì thuộc tính này không được đặt rõ trong constructor, kết quả là default.
const url = "https://example.com:4999/wt";
const transport = new WebTransport(url);
console.log(transport.congestionControl); // default
Thông số kỹ thuật
| Specification |
|---|
| WebTransport> # dom-webtransport-congestioncontrol> |