Member Junction
    Preparing search index...

    The bidirectional WebSocket media pump for a single call's media leg, modeling Vonage's binary-audio / text-event split. Production wires this over the accepted websocket for the call UUID (binary frames = L16 PCM audio, text frames = JSON control events); tests inject a fake. Audio is raw PCM ArrayBuffers — no envelope, no transcode — so RealVonageBindings just forwards bytes.

    interface IVonageMediaPump {
        Clear(callUuid: string): void;
        OnAudio(callUuid: string, handler: (pcm: ArrayBuffer) => void): void;
        OnEvent(
            callUuid: string,
            handler: (event: VonageControlEvent) => void,
        ): void;
        SendAudio(callUuid: string, pcm: ArrayBuffer): void;
    }
    Index

    Methods

    • Registers the inbound PCM16 audio handler for the call's binary media frames.

      Parameters

      • callUuid: string
      • handler: (pcm: ArrayBuffer) => void

      Returns void

    • Sends one outbound PCM16 audio frame as a BINARY websocket message (raw L16 PCM, no envelope).

      Parameters

      • callUuid: string
      • pcm: ArrayBuffer

      Returns void