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 getStats()
method of the WebTransportReceiveStream
interface asynchronously returns an object containing statistics for the current stream.
The statistics include the total number of ordered bytes that have arrived on this stream (ignoring network overhead, up until the first missing byte) and the total number that have been read by the application. It therefore provides a measure of how quickly the application is consuming bytes from the server on this particular stream.