WebTransport: congestionControl property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Note: This feature is available inWeb Workers.
ThecongestionControl read-only property of theWebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
The value is set in theWebTransport() constructor options.
In this article
Value
A string with one of the following values:
defaultThe default congestion control tuning for the transport.This is the default.
throughputThe application prefers congestion control to be tuned for throughput.
low-latencyThe application prefers congestion control to be tuned for low-latency.
Examples
This example shows how to get thecongestionControl preference.As this is not explicitly set in the constructor, the result isdefault.
const url = "https://example.com:4999/wt";const transport = new WebTransport(url);console.log(transport.congestionControl); // defaultSpecifications
| Specification |
|---|
| WebTransport> # dom-webtransport-congestioncontrol> |