Skip to main content

Crate hang

Crate hang 

Source
Expand description

§hang: WebCodecs compatible media encoding for MoQ

Media-specific library built on moq_net for streaming audio and video with WebCodecs.

Each hang broadcast consists of:

  • Catalog: A JSON track containing codec info and track metadata, updated live as tracks change.
  • Tracks: Audio or video, supporting one or more renditions.
  • Timeline: A JSON track mapping each media group to its start timestamp, so a consumer can seek (or build indexes/playlists) without downloading media.

Each track specifies a container format:

  • Legacy: A timestamp followed by the codec payload.
  • CMAF: Fragmented MP4 container (moof+mdat pair)

See the moq-mux crate for importing existing media formats into hang broadcasts.

Re-exports§

pub use catalog::Catalog;
pub use moq_net;

Modules§

catalog
The catalog is used to describe the available media tracks and codecs. The catalog describes available media tracks and codecs.
container
The container is the contents of each media track.
timeline
The timeline maps each media group to its start timestamp. The timeline track: an ordered log mapping each of a media track’s groups to its start timestamp.

Enums§

Error
Error types for the hang media library.

Type Aliases§

Result
A Result type alias for hang operations.