> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # SignalWire Browser SDK > Class, error, function, and type reference for the SignalWire Browser SDK. Reference for the SignalWire Browser SDK — every class, error, function, interface, and type the SDK exports. If you're new to the SDK, start with the [Overview](/docs/browser-sdk/v4/guides/overview) or jump straight to [`SignalWire`](/docs/browser-sdk/v4/reference/signalwire), the top-level client that owns the WebSocket session and produces every other entity in the SDK. The reference is organized by surface area. **Classes** are the things you interact with — the client, an active call, a participant, the directory. **Functions** are top-level helpers for logging, embeddable integrations, and type narrowing. **Errors** are the typed exceptions the SDK throws so you can branch on them with `instanceof`. Most stateful values are exposed in two complementary forms — a snapshot getter (`audioMuted`) and an observable suffixed with `$` (`audioMuted$`) for reactive UI binding. ## Install #### [npm](https://www.npmjs.com/package/@signalwire/js) @signalwire/js #### [GitHub](https://github.com/signalwire/signalwire-js) signalwire-js ```bash npm install @signalwire/js@latest rxjs ``` RxJS is a peer dependency — the SDK uses observables for all reactive state. See the [RxJS Primer](/docs/browser-sdk/v4/guides/rxjs-primer). ## **Classes** #### [SignalWire](/docs/browser-sdk/v4/reference/signalwire) Main entry point for the SignalWire Browser SDK. #### [Address](/docs/browser-sdk/v4/reference/address) Represents a contact or room in the directory. #### [Participant](/docs/browser-sdk/v4/reference/participant) Represents a participant in a call. #### [SelfParticipant](/docs/browser-sdk/v4/reference/self-participant) The local participant in a call, with additional device and media control. #### [SelfCapabilities](/docs/browser-sdk/v4/reference/self-capabilities) Manages the capability state for the self participant. #### [User](/docs/browser-sdk/v4/reference/user) Authenticated user profile. #### [ClientPreferences](/docs/browser-sdk/v4/reference/client-preferences) Public preferences API for configuring SDK behavior. #### [WebRTCCall](/docs/browser-sdk/v4/reference/webrtc-call) Concrete WebRTC call implementation. ### Credential Providers #### [EmbedTokenCredentialProvider](/docs/browser-sdk/v4/reference/credential-providers/embed-token-credential-provider) Exchanges an embed token for a SAT via the host's token endpoint. #### [StaticCredentialProvider](/docs/browser-sdk/v4/reference/credential-providers/static-credential-provider) Returns a fixed set of credentials. ### Errors #### [AuxiliaryLegCancelledError](/docs/browser-sdk/v4/reference/errors/auxiliary-leg-cancelled-error) Thrown when an auxiliary leg is removed before it finishes connecting. #### [AuxiliaryLegTimeoutError](/docs/browser-sdk/v4/reference/errors/auxiliary-leg-timeout-error) Thrown when an auxiliary leg does not connect within its budget. #### [CallCreateError](/docs/browser-sdk/v4/reference/errors/call-create-error) Thrown when a call cannot be created. #### [CallNotReadyError](/docs/browser-sdk/v4/reference/errors/call-not-ready-error) Thrown when a call RPC is attempted before the self member context has arrived. #### [CollectionFetchError](/docs/browser-sdk/v4/reference/errors/collection-fetch-error) Thrown when fetching a collection page fails. #### [DeviceTokenError](/docs/browser-sdk/v4/reference/errors/device-token-error) Thrown when device token issuance or validation fails. #### [DPoPInitError](/docs/browser-sdk/v4/reference/errors/dpop-init-error) Thrown when DPoP key initialization fails. #### [InvalidCredentialsError](/docs/browser-sdk/v4/reference/errors/invalid-credentials-error) Thrown when the SDK is rejected by the auth backend. #### [MediaAccessError](/docs/browser-sdk/v4/reference/errors/media-access-error) Thrown when local media (camera, microphone, or screen capture) cannot be acquired. #### [MediaTrackError](/docs/browser-sdk/v4/reference/errors/media-track-error) Thrown when a media track operation fails. #### [MessageParseError](/docs/browser-sdk/v4/reference/errors/message-parse-error) Thrown when an incoming message cannot be parsed. #### [OverconstrainedFallbackError](/docs/browser-sdk/v4/reference/errors/overconstrained-fallback-error) Thrown when `getUserMedia` fails with `OverconstrainedError` and all fallback levels are exhausted. #### [ParticipantNotReadyError](/docs/browser-sdk/v4/reference/errors/participant-not-ready-error) Thrown when a member RPC is attempted before that participant's call context has arrived. #### [PreflightError](/docs/browser-sdk/v4/reference/errors/preflight-error) Thrown when the preflight connectivity test fails. #### [RecoveryError](/docs/browser-sdk/v4/reference/errors/recovery-error) Thrown when a recovery attempt fails. #### [ScreenShareAlreadyActiveError](/docs/browser-sdk/v4/reference/errors/screen-share-already-active-error) Thrown when `startScreenShare()` is called while the call is already sharing a screen. #### [TokenRefreshError](/docs/browser-sdk/v4/reference/errors/token-refresh-error) Thrown when an access-token refresh fails. #### [UnexpectedError](/docs/browser-sdk/v4/reference/errors/unexpected-error) Catch-all for unexpected SDK errors. #### [VertoPongError](/docs/browser-sdk/v4/reference/errors/verto-pong-error) Thrown when a Verto ping/pong heartbeat fails. ## **Functions** #### [embeddableCall](/docs/browser-sdk/v4/reference/functions/embeddable-call) Creates a call using an embed token for simple, embeddable integrations. #### [isSelfParticipant](/docs/browser-sdk/v4/reference/functions/is-self-participant) Type guard that checks if a participant is the local `SelfParticipant`. #### [getLogger](/docs/browser-sdk/v4/reference/functions/get-logger) Retrieve the current SDK logger instance. #### [setLogger](/docs/browser-sdk/v4/reference/functions/set-logger) Replace the built-in logger with a custom implementation. Pass `null` to restore defaults. #### [setLogLevel](/docs/browser-sdk/v4/reference/functions/set-log-level) Set the log level for the built-in logger. No effect when a custom logger is set via `setLogger()`. #### [setDebugOptions](/docs/browser-sdk/v4/reference/functions/set-debug-options) Configure debug options (e.g., `{ logWsTraffic: true }`). ## **Variables** ### ready ```ts const ready: boolean = true ``` Flag indicating the library has been loaded and is ready to use. For UMD builds: `window.SignalWire.ready`. For ES modules: `import { ready } from '@signalwire/js'`. ### version ```ts const version: string = __VERSION__ ``` Library version from `package.json`, injected at build time. > Class, error, function, and type reference for the SignalWire Browser SDK.