Expand description
§moq-lite: Media over QUIC Transport
moq-lite is designed for real-time live media delivery with sub-second latency at massive scale.
This is a simplified subset of the official Media over QUIC (MoQ) transport, focusing on the practical features.
NOTE: While compatible with a subset of the IETF MoQ specification, many features are not supported on purpose.
I highly highly highly recommend using moq-lite instead of the IETF standard until at least draft-30.
§API
The API is built around Producer/Consumer pairs, with the hierarchy:
- Origin: A collection of Broadcasts, produced by one or more Sessions.
- Broadcast: A collection of Tracks, produced by a single publisher.
- Track: A collection of Groups, delivered out-of-order until expired.
- Group: A collection of Frames, delivered in order until cancelled.
- Frame: Chunks of data with an upfront size.
Re-exports§
pub use bytes;
Structs§
- Broadcast
- A collection of media tracks that can be published and subscribed to.
- Broadcast
Consumer - Subscribe to abitrary broadcast/tracks.
- Broadcast
Producer - Receive broadcast/track requests and return if we can fulfill them.
- Client
- A MoQ client session builder.
- Frame
- A chunk of data with an upfront size.
- Frame
Consumer - Used to consume a frame’s worth of data in chunks.
- Frame
Producer - Used to write a frame’s worth of data in chunks.
- Group
- A group contains a sequence number because they can arrive out of order.
- Group
Consumer - Consume a group, frame-by-frame.
- Group
Producer - Create a group, frame-by-frame.
- Origin
- A collection of broadcasts that can be published and subscribed to.
- Origin
Consumer - Consumes announced broadcasts matching against an optional prefix.
- Origin
Producer - Announces broadcasts to consumers over the network.
- Path
- A broadcast path that provides safe prefix matching operations.
- Server
- A MoQ server session builder.
- Session
- A MoQ transport session, wrapping a WebTransport connection.
- Time
Overflow - Timescale
- A timestamp representing the presentation time in a given scale. ex. 1000 for milliseconds.
- Track
- A track is a collection of groups, delivered out-of-order until expired.
- Track
Consumer - A consumer for a track, used to read groups.
- Track
Producer - A producer for a track, used to create new groups.
Enums§
- Error
- A list of possible errors that can occur during the session.
Constants§
- ALPNS
- ALPN strings for supported versions.
Traits§
- AsPath
- A trait for types that can be converted to a
Path.
Type Aliases§
- Origin
Announce - A broadcast path and its associated consumer, or None if closed.
- Path
Owned - An owned version of
Pathwith a'staticlifetime. - Result
- Time
- A timestamp representing the presentation time in milliseconds.