$ show w3c/webtransport
This is the official W3C WebTransport specification repository. It defines a JavaScript API for bidirectional, multiplexed network communication over QUIC and HTTP/3, providing reliable streams and unreliable datagrams. The repository contains the spec source in Bikeshed format (index.bs), supporting documents (explainer, use-cases, security questionnaire), and functional sample implementations (echo client/server and a WebCodecs-based video streaming demo). The core deliverable is the specification, while the samples serve as proof-of-concept implementations. The codebase is a hybrid: primarily a standards document, but includes runnable demo applications that illustrate the API usage patterns. The spec is still in early draft stage and references evolving IETF protocols.
The LLM identified 2 files worth highlighting for reuse:
A concise JavaScript client demonstrating the core WebTransport API: connecting, sending/receiving datagrams, creating unidirectional and bidirectional streams, and handling incoming streams. This pattern is directly reusable as a template for any WebTransport client implementation.
A Web Worker implementing a full video streaming pipeline: encoding WebCodecs frames, serializing with a custom 28-byte header, sending over WebTransport streams, receiving and decoding. Includes a reusable jitter buffer and RTT estimation algorithm. Demonstrates high craftsmanship in handling real-time media transport with statistics collection.