Crate moq_lite

Crate moq_lite 

Source
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 (see ietf::Version), many features are not supported on purpose. Additionally, the IETF standard is immature and up to interpretation, so many implementations are not compatible anyway. 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:

To publish media, create:

To consume media, create:

§Advanced Usage

Modules§

coding
Contains encoding and decoding helpers.
ietf
An implementation of the IETF MoQ specification.
lite
The low-level encoding for the moq-lite specification.

Structs§

Broadcast
A collection of media tracks that can be published and subscribed to.
BroadcastConsumer
Subscribe to abitrary broadcast/tracks.
BroadcastProducer
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.
FrameConsumer
Used to consume a frame’s worth of data in chunks.
FrameProducer
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.
GroupConsumer
Consume a group, frame-by-frame.
GroupProducer
Create a group, frame-by-frame.
Origin
A collection of broadcasts that can be published and subscribed to.
OriginConsumer
Consumes announced broadcasts matching against an optional prefix.
OriginProducer
Announces broadcasts to consumers over the network.
Path
A broadcast path that provides safe prefix matching operations.
Produce
A named tuple of a producer and consumer for convenience.
Server
A MoQ server session builder.
Session
A MoQ transport session, wrapping a WebTransport connection.
TimeOverflow
Timescale
A timestamp representing the presentation time in a given scale. ex. 1000 for milliseconds.
Track
TrackConsumer
A consumer for a track, used to read groups.
TrackProducer
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
The ALPN strings for supported versions.
VERSIONS
The versions of MoQ that are supported by this implementation.

Traits§

AsPath
A trait for types that can be converted to a Path.
SendSyncError
A trait that is Send+Sync except on WASM.

Type Aliases§

OriginAnnounce
A broadcast path and its associated consumer, or None if closed.
PathOwned
An owned version of Path with a 'static lifetime.
Result
Time
A timestamp representing the presentation time in milliseconds.