← Chrome 159 reference · All APIs
v159 · webtransport · enabled by default
WebTransport send groups and send-stream prioritization
Upgrades outgoing WebTransport streams in Chromium from plain WritableStream objects to WebTransportSendStream instances and adds WebTransport.createSendGroup(), WebTransportSendGroup, per-stream sendGroup and sendOrder prioritization, and byte-progress statistics via getStats() on both streams and groups while preserving WritableStream transferability.
at a glance
| Shipped in | Chrome 159 (desktop, Android, Android WebView), enabled by default — filed under “Enabled by default” in the milestone=159 listing and ChromeStatus API record |
|---|---|
| Runtime flag | Enabled by default (status: "stable" for WebTransportSendGroup in runtime_enabled_features.json5); previously gated behind chrome://flags/#enable-experimental-web-platform-features |
| Specification | W3C WebTransport — WebTransportSendStream, WebTransportSendGroup, createSendGroup(), WebTransportSendStreamStats |
| Explainers | Video frames with sendOrder, Game data with sendOrder, Managing bandwidth with send groups |
| Intent | blink-dev Intent to Ship |
| Tracking bug | crbug.com/568825278 |
| Web platform tests | sendgroup.https.any.html, sendorder.https.any.html, send-stream-stats.https.any.html, sendstream-bad-chunk.https.any.html |
| ChromeStatus | 5235261159112704 — WebTransport send groups and send-stream prioritization |
why it exists
Real-time media, cloud gaming, and telemetry applications multiplex multiple independent data flows — such as audio frames, video keyframes, delta frames, and control state — over a single WebTransport session. Without send groups and ordering weights, all outgoing streams compete in a flat pool where a burst of large delta frames can starve audio or control streams. Send groups partition outgoing streams into fairness domains so competing flows share bandwidth without starving one another, while sendOrder establishes strict priority among streams within a group (for example, sending keyframes before P-frames). Exposing getStats() on both WebTransportSendStream and WebTransportSendGroup lets applications measure written, sent, and QUIC-acknowledged bytes to detect congestion and drop stale frames proactively.
Syntax
Normative WebIDL from the W3C WebTransport specification alongside Chromium’s Blink IDL in Chrome 159:
// WebTransport additions (third_party/blink/renderer/modules/webtransport/web_transport.idl)
[Exposed=(Window,Worker), SecureContext]
partial interface WebTransport {
WebTransportSendGroup createSendGroup();
// Resolves to WebTransportSendStream in Chrome 159 (subclass of WritableStream)
Promise<WebTransportSendStream> createUnidirectionalStream(
optional WebTransportSendStreamOptions options = {});
// Resolves to WebTransportBidirectionalStream whose .writable is WebTransportSendStream
Promise<WebTransportBidirectionalStream> createBidirectionalStream(
optional WebTransportSendStreamOptions options = {});
};
[Exposed=(Window,Worker), SecureContext]
interface WebTransportSendGroup {
Promise<WebTransportSendStreamStats> getStats();
};
[Exposed=(Window,Worker), SecureContext]
interface WebTransportSendStream : WritableStream {
attribute WebTransportSendGroup? sendGroup;
attribute long long sendOrder;
Promise<WebTransportSendStreamStats> getStats();
// Spec defines WebTransportWriter getWriter(); Chrome 159 inherits WritableStream.getWriter()
};
dictionary WebTransportSendOptions {
WebTransportSendGroup? sendGroup = null;
long long sendOrder = 0;
};
dictionary WebTransportSendStreamOptions : WebTransportSendOptions {
// Spec also defines boolean waitUntilAvailable = false (not yet implemented in Chrome 159)
};
dictionary WebTransportSendStreamStats {
unsigned long long bytesWritten = 0;
unsigned long long bytesSent = 0;
unsigned long long bytesAcknowledged = 0;
};
This reference documents all five parts of the Chrome 159 surface: WebTransport.createSendGroup(), WebTransportSendGroup, WebTransportSendStream, WebTransportSendOptions / WebTransportSendStreamOptions, and WebTransportSendStreamStats.
WebTransport.createSendGroup()
Inputs. Takes no parameters. Must be called on a live (connecting or connected) WebTransport instance.
Outputs. Synchronously returns a newly allocated, distinct WebTransportSendGroup object bound exclusively to the calling WebTransport session. Repeated calls return distinct group instances even when no streams have been assigned yet.
Errors. Throws a synchronous InvalidStateError DOMException if the WebTransport session is already closed or failed. In Chromium, also throws OperationError if the internal 32-bit group identifier counter is exhausted.
createSendGroup(); Blink web_transport.cc; WPT sendgroup.https.any.js.
WebTransportSendGroup and getStats()
Inputs. WebTransportSendGroup has no constructor and is created only via transport.createSendGroup(). Its single method getStats() accepts no arguments.
Outputs. group.getStats() returns a Promise resolving to a WebTransportSendStreamStats dictionary summing bytesWritten, bytesSent, and bytesAcknowledged across all active and finalized streams assigned to the group. An empty group resolves immediately with all counters at 0. Finalized stream counters remain included in the group total even after individual streams or the parent WebTransport session close.
Reassignment caveat. In Chromium 159, moving an already-finalized stream to a different group subtracts its lifetime counters from the previous group and adds them to the new group (open spec discussion in w3c/webtransport#802).
Source: W3C WebTransportWebTransportSendGroup; Blink web_transport_send_group.cc; WPT send-stream-stats.https.any.js.
WebTransportSendStream (sendGroup, sendOrder, getStats(), transfer)
Inputs & outputs. WebTransportSendStream subclasses WritableStream and is the runtime object returned by createUnidirectionalStream() and exposed on bidirectional.writable. It preserves stream instanceof WritableStream === true and inherits WritableStream’s transfer steps (postMessage(stream, [stream]) transfers the underlying writable pipe across realms without breaking existing code).
| Member | Type / default | Behavior & errors |
|---|---|---|
sendGroup | WebTransportSendGroup? (default null) | Gets or reassigns the stream’s send group dynamically. Setting a group created by a different WebTransport instance throws InvalidStateError. Setting null returns the stream to the ungrouped pool. Each change dispatches a priority update to the network service. |
sendOrder | long long (default 0) | Signed 64-bit integer priority weight relative to other streams sharing the same sendGroup (or ungrouped streams when sendGroup is null). Higher values are scheduled ahead of lower values. Assigning null coerces to 0 per WebIDL long long conversion. Can be mutated dynamically after stream creation. |
getStats() | Promise<WebTransportSendStreamStats> | Resolves to a snapshot of bytesWritten, bytesSent, and bytesAcknowledged for this stream. Continues returning the finalized byte counts after the stream or session closes. |
getWriter() | Inherited WritableStreamDefaultWriter (Chrome 159) | The W3C spec defines a specialized WebTransportWriter subclass (adding atomicWrite() and commit()), which is not yet implemented in Chromium 159 (crbug.com/487117768); calling getWriter() returns a standard WritableStreamDefaultWriter. |
WebTransportSendStream; Blink web_transport_send_stream.cc; WPT sendorder.https.any.js.
WebTransportSendOptions and WebTransportSendStreamOptions
Inputs. Both createUnidirectionalStream(options) and createBidirectionalStream(options) accept an optional WebTransportSendStreamOptions dictionary inheriting from WebTransportSendOptions:
sendGroup(WebTransportSendGroup?, defaultnull): assigns the new stream to the specified send group at creation time. Passing a group from anotherWebTransportinstance causes stream creation to reject withInvalidStateError.sendOrder(long long, default0): sets the stream’s initial priority weight within its send group (or among ungrouped streams).waitUntilAvailable(W3C specboolean = false): not yet implemented in Chromium 159 (crbug.com/487117768); stream creation rejects immediately if peer stream limits are exhausted.
Outputs & datagrams. The same WebTransportSendOptions dictionary (sendGroup and sendOrder) is also accepted by transport.datagrams.createWritable(options), returning a WebTransportDatagramsWritable whose sendGroup and sendOrder attributes can be read and updated dynamically.
WebTransportSendStreamOptions; Blink web_transport_send_stream_options.idl; WPT sendgroup.https.any.js.
WebTransportSendStreamStats
Inputs & outputs. Returned as the resolved dictionary from both WebTransportSendStream.getStats() and WebTransportSendGroup.getStats(). All three fields are non-negative unsigned long long byte counters initialized to 0:
| Field | Type (default) | Meaning |
|---|---|---|
bytesWritten | unsigned long long (0) | Total application payload bytes successfully accepted by the stream(s) via write(). |
bytesSent | unsigned long long (0) | Total stream bytes transmitted on the wire by the QUIC transport (never exceeds bytesWritten; advances asynchronously). |
bytesAcknowledged | unsigned long long (0) | Total stream bytes confirmed received by the peer via QUIC acknowledgments (bytesAcknowledged <= bytesSent <= bytesWritten). |
Comparing bytesWritten - bytesSent measures local send-buffer backlog; comparing bytesSent - bytesAcknowledged measures in-flight unacknowledged bytes.
WebTransportSendStreamStats; WPT send-stream-stats.https.any.js.
Errors, breaking-change note, and recovery
InvalidStateError(DOMException): thrown synchronously bytransport.createSendGroup()on a closed or failed transport, thrown synchronously by thestream.sendGroupsetter when given a group from a differentWebTransportsession, and rejected asynchronously when passed a foreignsendGroupinsideWebTransportSendStreamOptionstocreateUnidirectionalStream()/createBidirectionalStream().OperationError(DOMException): thrown synchronously bycreateSendGroup()in Chromium if the 32-bit group ID counter overflows.TypeError: writing a non-BufferSourcechunk to aWebTransportSendStreamrejects the write promise withTypeError(verified by WPTsendstream-bad-chunk.https.any.html).- Constructor / prototype check migration: in Chrome < 159, outgoing streams were plain
WritableStreamobjects (stream.constructor === WritableStream). In Chrome 159+,stream.constructor === WebTransportSendStreamwhilestream instanceof WritableStreamremainstrue. Replace exact constructor equality checks withinstanceof WritableStreamor feature-detect"WebTransportSendStream" in globalThis. - Cross-engine
getStats()fallback: Firefox < 160 rejectsWebTransportSendStream.getStats()withNotSupportedErrorand resolvesWebTransportSendGroup.getStats()with an empty object{}; wrapgetStats()calls intry/catchand verifytypeof stats.bytesAcknowledged === "number".
Context and exposure
WebTransportSendGroup and WebTransportSendStream are exposed in Window and Worker (including dedicated, shared, and service workers) and require a Secure Context (https:// or http://localhost). Creating streams or send groups requires an active WebTransport session; no special Permissions Policy or user activation is needed.
Lifecycle and state transitions
A WebTransportSendGroup is created while its parent WebTransport is connecting or connected and remains valid for the session’s lifetime (including post-close getStats() queries). Streams can be attached to a send group at creation time via options.sendGroup and moved between groups (or ungrouped with null) at any point before closing; each sendGroup or sendOrder mutation sends an immediate asynchronous priority update over Mojo to Chromium’s QUIC network stack. When a stream finishes or aborts, its final byte counters are snapshotted into the stream and rolled into its current group’s finalized totals so subsequent getStats() calls resolve immediately without a network-service round trip. Calling postMessage(stream, [stream]) transfers the underlying WritableStream pipe across realms.
Examples
No live interactive demo exists yet on the Chrome Platform Showcase for Chrome 159 (checked 2026-11-24). The examples below demonstrate send-group isolation, dynamic priority elevation, and congestion-aware byte statistics.
Isolating audio and video flows with send groups and sendOrder
const transport = new WebTransport("https://media.example.com/ingest");
await transport.ready;
// Feature-detect send groups before creating fairness domains
const supportsSendGroups = typeof transport.createSendGroup === "function";
const audioGroup = supportsSendGroups ? transport.createSendGroup() : null;
const videoGroup = supportsSendGroups ? transport.createSendGroup() : null;
// Pass WebTransportSendStreamOptions ({ sendGroup, sendOrder }) to prioritize keyframes over delta frames
const keyframeStream = await transport.createUnidirectionalStream(
videoGroup ? { sendGroup: videoGroup, sendOrder: 100 } : undefined,
);
const deltaStream = await transport.createUnidirectionalStream(
videoGroup ? { sendGroup: videoGroup, sendOrder: 10 } : undefined,
);
// Audio uses an independent send group so video bursts do not starve it
const audioStream = await transport.createUnidirectionalStream(
audioGroup ? { sendGroup: audioGroup, sendOrder: 50 } : undefined,
);
const encoder = new TextEncoder();
const writer = keyframeStream.getWriter();
await writer.write(encoder.encode("keyframe-payload"));
await writer.close();
// Dynamically reprioritize or reassign an open stream
if ("sendOrder" in deltaStream) {
deltaStream.sendOrder = 200; // promote within videoGroup
deltaStream.sendGroup = null; // or detach to the ungrouped pool
}
Source: W3C WebTransport Explainer §8; WPT sendgroup.https.any.js.
Monitoring send backlog with getStats() and cross-browser guards
async function readSendProgress(streamOrGroup) {
if (typeof streamOrGroup?.getStats !== "function") {
return null;
}
try {
const stats = await streamOrGroup.getStats();
// Firefox < 160 resolves group.getStats() with {}
if (typeof stats.bytesAcknowledged !== "number") {
return null;
}
return {
written: stats.bytesWritten,
queuedLocally: stats.bytesWritten - stats.bytesSent,
inFlight: stats.bytesSent - stats.bytesAcknowledged,
acked: stats.bytesAcknowledged,
};
} catch (err) {
// Firefox < 160 rejects WebTransportSendStream.getStats() with NotSupportedError
if (err instanceof DOMException && err.name === "NotSupportedError") {
return null;
}
throw err;
}
}
const groupProgress = await readSendProgress(videoGroup);
if (groupProgress && groupProgress.queuedLocally > 256 * 1024) {
// Back off or drop low-priority delta frames
await deltaStream.abort(new WebTransportError("Congestion drop", { streamErrorCode: 1 }));
}
Source: WPT send-stream-stats.https.any.js; BCD WebTransportSendStream.json.
Browser compatibility
| Browser | Send groups & sendOrder | getStats() (stream / group) | Notes & evidence |
|---|---|---|---|
| Chrome (desktop, Android, WebView) | 159 | 159 (full) | Enabled by default per ChromeStatus and BCD; WebTransportWriter and waitUntilAvailable not yet implemented |
| Edge | Chromium-based (mirror) | Chromium-based (mirror) | Mirrors Chrome in BCD; exact Edge release number not separately published |
| Firefox | 155 (sendOrder: 121) | 160 (partial earlier) | WebTransportSendStream in 114, sendOrder option in 119 / attribute in 121, WebTransportSendGroup & createSendGroup() in 155 (Bug 2007165). Stream getStats() rejects with NotSupportedError in 114–159; group getStats() returns {} in 155–159 |
| Safari | 26.4 | 26.4 (group partial) | Ships WebTransportSendGroup, WebTransportSendStream, WebTransportWriter, and stream getStats() per BCD; WebTransportSendGroup.getStats() only counts datagram bytes in 26.4 |
Security and privacy
Send groups and stream prioritization introduce no new network permissions, origin boundaries, or cross-origin channels. Every WebTransportSendGroup is scoped to a single secure-context WebTransport session, and Chromium rejects attempts to assign a send group created on one WebTransport instance to a stream on another instance (throwing InvalidStateError). Byte statistics returned by getStats() only report counters for data written and transmitted by the application’s own streams and groups, without exposing shared network state from other origins. ChromeStatus records security and privacy reviews as Pending (checked 2026-11-24).
Specifications
see also
- MDN —
WebTransportSendGroup - MDN —
WebTransportSendStream - MDN —
WebTransport.createSendGroup() - gendn Chrome 159 — WebTransportError API alignment and serialization
- W3C WebTransport Explainer — Managing bandwidth with send groups
- ChromeStatus — WebTransport send groups and send-stream prioritization (5235261159112704)