rtc/rtc_mesh.svelte.ts view source
import {RtcMesh} from '@fuzdev/fuz_app/rtc/rtc_mesh.svelte.js'; The peers of a full-mesh call over one room. See the module doc.
slots
type readonly RtcSlot[]
peers
A peer for each other member while seated, by member id.
type SvelteMap<Branded, RtcPeer>
local_member_id
The seat's member id while connected, else null.
type Branded | null
error
Why the mesh connects nothing (an unsupported topology), or the last peer
that couldn't be made, else null; cleared by the next seat.
type string | null
closed
Whether close was called.
type boolean
constructor
type new (deps: RtcPeerDeps, options: RtcMeshOptions): RtcMesh
deps
options
set_track
Send track in slot to every peer, and to each peer made later; null
sends nothing there. No renegotiation: each peer replaces its slot's track.
type (slot: string, track: MediaStreamTrack | null): Promise<void>
slot
the slot's name
stringtrack
the track, of the slot's kind, or null
MediaStreamTrack | nullPromise<void>throws
Error- when no slot has that name
close
Close every peer and stop following the room. The local tracks are the caller's and stay live.
type (): void
voidmutates
this— sets `closed`, empties `peers`