Member Junction
    Preparing search index...

    One Twilio Media-Streams media frame as it appears (post-JSON-parse) on the websocket.

    interface TwilioMediaFrame {
        dtmf?: { digit: string };
        event: string;
        media?: { chunk?: string; payload: string; timestamp?: string };
        streamSid?: string;
    }
    Index

    Properties

    dtmf?: { digit: string }

    The DTMF payload (present on dtmf events) — the pressed key.

    Type Declaration

    • digit: string

      The DTMF digit Twilio detected on the stream (0-9, *, #).

    event: string

    Always 'media' for an audio frame (vs 'start'/'stop'/'dtmf' events).

    media?: { chunk?: string; payload: string; timestamp?: string }

    The media payload — payload is base64-encoded μ-law/8k audio.

    Type Declaration

    • Optionalchunk?: string

      Monotonic chunk counter, Twilio-supplied.

    • payload: string

      Base64-encoded G.711 μ-law @ 8 kHz mono audio bytes.

    • Optionaltimestamp?: string

      Monotonic frame timestamp (ms since stream start), Twilio-supplied.

    streamSid?: string

    The Media-Streams stream identifier (present on media/start/stop).