hang
The hang media format on top of moq-net: a live catalog describing renditions with WebCodecs-style decoder configs, and containers that carry a timestamp with every frame.
- Catalog producer and consumer. Typed
VideoConfig,AudioConfigand text renditions, thejsonandbinarydata track sections, shared video properties (display size, rotation, flip), stalled hints, cross-broadcast rendition references, and thearchiveentry (timeline track, optional replay path, store URL, and format version). Extend it with your own sections through a lock or#[serde(flatten)], or read unknown sections as raw JSON. - Containers.
legacy,cmaf, andloc, decoded for you; unknown kinds pass through untouched. Orderedreads a media track as timestamped frames, reorders groups, and skips ones that fall past your max age.- Codecs described: H.264, H.265, VP8, VP9, AV1, AAC, Opus, PCM.
cargo add hangCatalog::<E>::subscribe(&broadcast).await? opens the uncompressed catalog track and returns a typed consumer; consumer.next().await? yields root updates. Updates exceeding catalog::MAX_RENDITIONS are refused with Error::TooManyRenditions. Media retention uses the public container::MAX_AGE constant.
Producing media is usually done through moq-mux (from a container) or moq-video and moq-audio (from a device), which build the catalog for you. Examples: video.rs and subscribe.rs. API: docs.rs/hang. The TypeScript twin is @moq/hang.