Skip to main content

hang/
lib.rs

1//! # hang: WebCodecs compatible media encoding for MoQ
2//!
3//! Media-specific library built on [moq_net] for streaming audio and video with WebCodecs.
4//!
5//! Each `hang` broadcast consists of:
6//!
7//! - **Catalog**: A JSON track containing codec info and track metadata, updated live as tracks change.
8//! - **Tracks**: Audio or video, supporting one or more renditions.
9//! - **Timeline**: A JSON track mapping each media group to its start timestamp, so a
10//!   consumer can seek (or build indexes/playlists) without downloading media.
11//!
12//! Each track specifies a container format:
13//! - **Legacy**: A timestamp followed by the codec payload.
14//! - **CMAF**: Fragmented MP4 container (moof+mdat pair)
15//!
16//! See the [moq-mux](https://crates.io/crates/moq-mux) crate for importing existing media formats into hang broadcasts.
17mod error;
18
19/// The catalog is used to describe the available media tracks and codecs.
20pub mod catalog;
21
22/// The container is the contents of each media track.
23pub mod container;
24
25/// The timeline maps each media group to its start timestamp.
26pub mod timeline;
27
28/// Export the moq-net version we use.
29pub use moq_net;
30
31pub use catalog::Catalog;
32pub use error::*;