Member Junction
    Preparing search index...

    The bidirectional Media-Streams frame pump for a single call's websocket. Production wires this over the accepted websocket for the Call SID; tests inject a fake. The pump speaks raw frame objects — transcode happens in RealTwilioBindings via the pure helpers above.

    interface ITwilioMediaPump {
        ExpectCall?(callSid: string, token: string): void;
        GetStreamSid(callSid: string): string;
        OnFrame(callSid: string, handler: (frame: TwilioMediaFrame) => void): void;
        Send(callSid: string, frame: TwilioMediaFrame): void;
    }

    Implemented by

    Index

    Methods

    • Optional. Registers the per-call media-socket token for a call MJ has just placed (the REST calls.create response is the first moment the Call SID is known). The pump uses it to authenticate the Media-Streams start frame; a pump that does not authenticate sockets may omit it.

      Parameters

      • callSid: string
      • token: string

      Returns void