Member Junction
    Preparing search index...

    A single playable media source. A player may receive one or many. For multiple video tracks the player renders a responsive grid; for a single audio track it renders the transport bar (optionally with a waveform).

    interface MediaTrack {
        Id: string;
        Kind: MediaKind;
        Label?: string;
        MimeType?: string;
        Peaks?: number[];
        PosterUrl?: string;
        Url: string;
    }
    Index

    Properties

    Id: string

    Stable identifier — used for track-by in the template and event correlation.

    Kind: MediaKind

    Audio vs. video — drives which element the player creates.

    Label?: string

    Optional human label (e.g. a speaker / camera name) shown in multi-track layouts.

    MimeType?: string

    Optional MIME type hint (e.g. audio/mpeg, video/mp4).

    Peaks?: number[]

    Optional precomputed waveform peaks — an array of normalized 0..1 amplitude values, one per rendered bar (left → right across the track's duration).

    This is the forward path for server-precomputed peaks + streaming media: when a track supplies Peaks, the player renders them directly and performs no client-side decoding (no fetch, no AudioContext). When Peaks is absent (and the waveform is enabled for an audio track), the player extracts real peaks client-side by decoding Url; on any decode failure it falls back to a plain progress bar.

    Values are clamped to [0, 1] at render time; provide as many entries as you like — the player renders one bar per value.

    PosterUrl?: string

    Optional poster image for video tracks shown before playback.

    Url: string

    The media URL (http(s) or a blob: object URL).