WebTransportReceiveStream

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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.

The WebTransportReceiveStream interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.

The stream is a readable byte stream of Uint8Array, and can be consumed using either a BYOB reader (ReadableStreamBYOBReader) or the default reader (ReadableStreamDefaultReader).

Objects of this type are not constructed directly. Instead they are obtained using the WebTransport.incomingUnidirectionalStream property.

WebTransportReceiveStream is a transferable object.

ReadableStream WebTransportReceiveStream

Instance properties

Inherits properties from its parent interface, ReadableStream.

Instance methods

Also inherits properties from its parent interface, ReadableStream.

WebTransportReceiveStream.getStats() Experimental

Returns a Promise that resolves with statistics related to this stream.

Examples

See WebTransport.incomingUnidirectionalStreams for an example of how to get a ReadableStream of WebTransportReceiveStream objects.

Specifications

Specification
WebTransport
# webtransportreceivestream

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
WebTransportReceiveStream
Experimental
getStats
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also