SignalWire
SignalWire is the top-level client for the Browser SDK and the only class
applications instantiate directly. A single instance owns the WebSocket
transport, the authenticated session, the local media-device controller, and
the call factory used by dial. Every other entity in the SDK —
WebRTCCall,
User,
Address — is produced or fetched
through it.
Lifecycle: construct with a CredentialProvider,
then await connection-readiness via ready$ or connect
before placing or receiving calls. Calls to register opt the
user into inbound calls; unregister reverses it.
destroy tears down all transports, timers, and subscriptions —
hold a reference to the client for the lifetime of your app and call
destroy() exactly once on tear-down.
Device management methods (enable*, disable*, select*, applySelected*)
operate on a shared device pool surfaced through observable accessors
(audioInputDevices$, selectedVideoInputDevice$, etc.). Selections are
persisted via the configured StorageManager when
ClientPreferences.enableSavePreferences
is set. Most state is exposed in two forms — a snapshot getter and an
observable ($) for reactive UI binding.
Examples
Extends
Destroyable
Implements
Constructors
Constructor
Creates a new SignalWire client and begins connecting.
Parameters
credentialProvider
Provider that supplies authentication credentials. See CredentialProvider.
options
Configuration options (connection, device monitoring, preferences). See SignalWireOptions.
Properties
preferences
Global SDK preferences (timeouts, ICE config, media defaults).