MoQ is under active development. APIs and protocols may change between releases.

Skip to content

@moq/hang

npm

The hang media format as TypeScript types and codecs, shared by @moq/watch and @moq/publish.

  • Catalog: zod schemas for the root, video and audio renditions, containers, and timelines. The root is a loose object, so z.extend(Catalog.RootSchema, { yourSection }) adds your own.
  • Containers: Container.Legacy producer/consumer and Container.Cmaf init and data segment helpers.
  • Utilities: hex, priority and latency math, an Opus polyfill for browsers without a native decoder, and the browser quirks the media packages work around.
ts
import * as Catalog from "@moq/hang/catalog";
import * as Container from "@moq/hang/container";

Most apps never import it directly; the elements and Broadcast classes in the watch and publish packages do. Reach for it when hand-rolling a catalog or building a custom player.

Licensed under MIT or Apache-2.0