Skip to main content

@dialstack/sdk-dev / webrtc/src / RingbackTone

Class: RingbackTone

Defined in: sdk/webrtc/src/ringback.ts:54

Outbound ringback contract the call core drives. The core never guards the call site, so implementations must be idempotent and no-op silently when their audio backend is unavailable. Web is RingbackTone (WebAudio); React Native supplies its own (InCallManager-backed) via PhoneOptions.ringback, because WebAudio's AudioContext doesn't exist there.

Implements

Constructors

Constructor

TypeScript
new RingbackTone(): RingbackTone;

Returns

RingbackTone

Accessors

isPlaying

Get Signature

TypeScript
get isPlaying(): boolean;

Defined in: sdk/webrtc/src/ringback.ts:66

Returns

boolean

Implementation of

Ringback.isPlaying

Methods

setSinkId()

TypeScript
setSinkId(deviceId): void;

Defined in: sdk/webrtc/src/ringback.ts:75

Applied at AudioContext construction in start(), not after: the async setter would let the first milliseconds out of the default device. A context already running is re-routed live — the one case the setter is needed for.

Parameters

deviceId

string | null

Returns

void

Implementation of

Ringback.setSinkId


start()

TypeScript
start(): void;

Defined in: sdk/webrtc/src/ringback.ts:85

Returns

void

Implementation of

Ringback.start


stop()

TypeScript
stop(): void;

Defined in: sdk/webrtc/src/ringback.ts:140

Returns

void

Implementation of

Ringback.stop