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 indexing the broadcast’s aligned segments (one or more groups each), so a consumer can seek (or build indexes/playlists) without downloading media. Advertised by the catalog’s archive entry.

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 the tracks a broadcast publishes.
container
The container is the contents of each media track.
timeline
The timeline indexes the broadcast’s aligned segments. The timeline track: the broadcast’s segment index, one record per aligned segment.

Enums§

Error
Error types for the hang media library.

Type Aliases§

Result
A Result type alias for hang operations.