Member Junction
    Preparing search index...

    A single frame of media on a bridge track.

    Frames are intentionally minimal and serializable. The payload is carried EITHER as raw binary (Bytes, the fast in-process path used by server-bridged drivers) OR as a base64 string (Base64, for transports that can only move text) — a frame should populate exactly one. Keeping the payload representation explicit avoids guessing and keeps the type free of any.

    interface BridgeMediaFrame {
        Base64?: string;
        Bytes?: ArrayBuffer;
        Height?: number;
        KeyFrame?: boolean;
        MimeType?: string;
        SourceID?: string;
        SourceLabel?: string;
        SpeakerLabel?: string;
        TimestampMs?: number;
        Track: BridgeMediaTrackKind;
        Width?: number;
    }
    Index

    Properties

    Base64?: string

    Frame payload as a base64-encoded string. Used by transports that can only carry text. Mutually exclusive with BridgeMediaFrame.Bytes; populate one.

    Bytes?: ArrayBuffer

    Raw frame payload as binary. Preferred for in-process server-bridged drivers — no intermediate encoding. Mutually exclusive with BridgeMediaFrame.Base64; populate one.

    Height?: number

    The video's height in pixels, set and left out together with BridgeMediaFrame.Width.

    KeyFrame?: boolean

    Whether a decoder can start at this frame, with no frame before it. true for a still image (a JPEG or PNG decodes on its own); for a fragment of encoded video, whether its first video frame is a key frame. Absent where the producer does not know, and on a piece that carries no video frame (audio, an MP4 init segment); a consumer treats absent as unknown.

    MimeType?: string

    The payload's format, for example 'image/jpeg' for a video-in frame. Audio frames may omit it (they are in the session's declared input format); a video frame without one cannot be sent to a model that needs an image type, and the realtime driver drops it.

    SourceID?: string

    Which source a video-in or screen-in frame comes from, when the endpoint can have several (each participant's camera, a shared screen): an opaque key that stays the same for one source, for example 'participant:ada:camera'. A model that takes one video stream is shown one source at a time; this key is how the host tells sources apart and notices a switch. Absent on audio frames and where there is only one source.

    SourceLabel?: string

    A human-readable name for the BridgeMediaFrame.SourceID source ("Ada's camera", "Ada's screen"), for the note that tells the model what it is now looking at.

    SpeakerLabel?: string

    Optional per-speaker label for diarized inbound media (requires the provider's SpeakerDiarization feature). Lets turn-taking attribute speech to a named participant. Typically the participant's ExternalId or display name.

    TimestampMs?: number

    Optional epoch-millisecond capture timestamp for the frame, used for ordering, latency accounting, and silence-window calculations in the turn-taking policy. When omitted the consumer may stamp arrival time.

    Which track this frame belongs to (kind + direction).

    Width?: number

    The video's width in pixels, where the producer knows it: an image's own width (after any rotation and scaling), or for a fragmented MP4 stream, the width its init segment gives the video track, on the init segment and on each fragment that carries video. Absent on audio and wherever the producer does not know it; a consumer treats absent as unknown.