Member Junction
    Preparing search index...

    An in-memory, platform-free Realtime Bridge driver for test and development.

    LoopbackBridge proves the transport seam round-trips media with NO external conferencing or telephony platform: every frame sent via SendMedia is echoed straight back through the inbound OnMedia handler (re-stamped to the matching inbound track), and GetParticipants returns a single synthetic agent participant. Wired into AIBridgeEngine with a mock IRealtimeSession, it demonstrates that bridge → session → bridge media flow works end-to-end — the deferred "unified-transport track" foundation, validated with zero infrastructure.

    It declares an audio-capable, diarizing feature set so the engine exercises both the media seam and participant tracking against it. Telephony/recording features stay off (their virtual base methods keep throwing NotSupported), so the loopback driver also documents the capability-gating contract by example.

    Registered via @RegisterClass(BaseRealtimeBridge, 'LoopbackBridge').

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The capability flags for the provider this bridge instance serves. Populated from the RealtimeBridgeContext at BaseRealtimeBridge.Connect time (and may be set by the engine immediately after construction). Drives BaseRealtimeBridge.RequireFeature.

    providerName: string

    The provider's display name for this bridge instance, used in capability-error messages. Populated from the RealtimeBridgeContext; falls back to the driver class name.

    Sent: BridgeMediaFrame[] = []

    Every frame the engine sent outbound, in order — a capture sink for assertions in tests. The frames are ALSO echoed back inbound; this array is the durable record of what was sent.

    Accessors

    Methods

    • Flushes any outbound media the driver has queued for the endpoint — the agent's not-yet-played voice. The engine calls this on a true barge-in (the user interrupts the agent) so the agent stops talking immediately instead of draining already-buffered audio after the model was cut off.

      No-op by default (NOT capability-gated): a driver with no client-side outbound buffer simply has nothing to flush, so calling this is always safe. Drivers that buffer outbound audio override it.

      Returns void

    • Registers a handler for inbound DTMF tones on a telephony bridge.

      Capability-gated by SupportedFeatures.DTMF. Throws unless overridden.

      Parameters

      • _handler: (digits: string) => void

        Invoked with each received DTMF digit string.

      Returns void

      when not overridden.

    • Sends DTMF tones on a telephony bridge.

      Capability-gated by SupportedFeatures.DTMF. Throws unless overridden by a telephony driver.

      Parameters

      • _digits: string

        The DTMF digit string to send (e.g. '1234#').

      Returns Promise<void>

      A promise that resolves once the tones have been sent.

      when not overridden.

    • Requests that the platform begin recording the session.

      Capability-gated by SupportedFeatures.Recording (and subject to per-jurisdiction consent handling upstream). Throws unless overridden.

      Returns Promise<void>

      A promise that resolves once recording has started.

      when not overridden.

    • Transfers the call to another party on a telephony bridge.

      Capability-gated by SupportedFeatures.CallTransfer. Throws unless overridden.

      Parameters

      • _target: string

        The transfer target (a phone number or platform endpoint identifier).

      Returns Promise<void>

      A promise that resolves once the transfer has been initiated.

      when not overridden.