@dialstack/sdk-dev / webrtc/src / LocalConference
Class: LocalConference
Defined in: sdk/webrtc/src/conference.ts:162
A live local conference across two or more legs.
Owns the AudioContext and every node in the graph. dispose() restores each
leg's original uplink and tears the graph down; it is idempotent and safe
after a leg has already ended.
Constructors
Constructor
new LocalConference(): LocalConference;
Returns
LocalConference
Accessors
calls
Get Signature
get calls(): Call[];
Defined in: sdk/webrtc/src/conference.ts:184
The calls currently bridged, in merge order.
Returns
Call[]
isActive
Get Signature
get isActive(): boolean;
Defined in: sdk/webrtc/src/conference.ts:199
Returns
boolean
localMediaStream
Get Signature
get localMediaStream(): MediaStream | null;
Defined in: sdk/webrtc/src/conference.ts:195
What the local user should hear: every remote party mixed together.
The softphone binds its <audio> element to this instead of one call's
remoteMediaStream while merged — otherwise the user would hear only
whichever leg happens to be focused.
Returns
MediaStream | null
Methods
dispose()
dispose(): void;
Defined in: sdk/webrtc/src/conference.ts:457
Tear the conference down: every leg returns to its own mic uplink and the graph is released. Idempotent.
Returns
void
has()
has(call): boolean;
Defined in: sdk/webrtc/src/conference.ts:204
Whether call is part of this conference.
Parameters
call
Returns
boolean
remove()
remove(call): void;
Defined in: sdk/webrtc/src/conference.ts:391
Drop one leg (it hung up, or was split off), restoring its own uplink. The remaining legs stay bridged; the caller disposes once fewer than two remain.
Parameters
call
Returns
void
setMuted()
setMuted(muted): void;
Defined in: sdk/webrtc/src/conference.ts:374
Apply a mute change across the conference.
Once merged the wire carries the MIXED track, so Call.mute()'s own
localStream toggle no longer reaches it — the call routes mute here
instead (see Call.attachConference).
Parameters
muted
boolean
Returns
void
merge()
static merge(
calls,
micStream,
onUplinkError?
): LocalConference;
Defined in: sdk/webrtc/src/conference.ts:215
Bridge calls into one conversation, mixing against micStream (the local
capture every leg shares).
Throws — leaving the calls untouched — if the host has no WebAudio or a leg isn't mergeable; the caller surfaces that as an ordinary call error.
Parameters
calls
Call[]
micStream
MediaStream
onUplinkError?
(error) => void
Returns
LocalConference