supervision-js
    Preparing search index...

    Interface MediaSessionOptions

    Options for creating one renderer-owned media session.

    interface MediaSessionOptions {
        container: HTMLElement;
        media: MediaSessionMedia;
        mode?: MediaSessionMode;
        normalize?: false | MediaSessionNormalizationOptions;
        detections?: MediaSessionDetectionOptions;
        playbackGate?: boolean;
        onState?: (state: MediaSessionState) => void;
        presentation?: MediaRendererPresentation;
        renderer?: MediaSessionRendererOptions;
    }
    Index
    container: HTMLElement

    DOM element where the renderer should mount its canvas.

    Media to prepare and render. This can be a URL, an uploaded file/blob, or a lower-level renderer source.

    File mode is bounded media. Stream mode tunes defaults for live or append-only detection sources.

    Optional browser media normalization before rendering.

    Detection frames or sources to render with the media.

    playbackGate?: boolean

    Buffered playback: hold the picture until the frame it is about to show has both its detections and its prepared annotation artifacts, so a preview opens annotated rather than opening bare and filling in.

    On by default. false starts playback at once and draws annotations as they land, which suits a host that cares about cadence more than overlays. The switch answers for detections.playbackGate and renderer.renderPreparation.playbackGate together, each keeping its own lookahead; set either one's enabled to answer for that gate alone.

    The detection gate only applies to a session with appendable detections, since a source that is complete before playback starts has nothing to wait for. true turns it on for any session.

    What it holds depends on who owns the playhead. A source the renderer pulls decoded samples from is held frame by frame, for as long as playback runs. A source that presents its own frames, which is what createVideoEngineMediaRendererSource returns, is held at the start of playback only: the session reports buffering until the frame it will resume on is covered, and once the producer is running it paces itself.

    onState?: (state: MediaSessionState) => void

    Aggregate loading, playback, buffering, processing, and error state.

    Box, mask, label, interaction, and focus presentation styles.

    Renderer playback, interaction, diagnostics, and render-preparation options.