WebTransport: congestionControl 屬性
注意:此功能在 Web Workers 中可用。
WebTransport 介面的只讀屬性 congestionControl 指示了應用程式在傳送資料時偏好高吞吐量還是低延遲。
該值在 WebTransport() 建構函式選項中設定。
值
一個字串,其值可能為以下之一:
default-
傳輸的預設擁塞控制調整。這是預設值。
throughput-
應用程式偏好擁塞控制針對吞吐量進行調整。
low-latency-
應用程式偏好擁塞控制針對低延遲進行調整。
示例
此示例演示瞭如何獲取 congestionControl 偏好設定。由於未在建構函式中顯式設定,因此結果為 default。
js
const url = "https://example.com:4999/wt";
const transport = new WebTransport(url);
console.log(transport.congestionControl); // default
規範
| 規範 |
|---|
| WebTransport # dom-webtransport-congestioncontrol |
瀏覽器相容性
載入中…