> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# 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

@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**

Main entry point for the SignalWire Browser SDK.

Represents a contact or room in the directory.

Represents a participant in a call.

The local participant in a call, with additional device and media control.

Manages the capability state for the self participant.

Authenticated user profile.

Public preferences API for configuring SDK behavior.

Concrete WebRTC call implementation.

### Credential Providers

Exchanges an embed token for a SAT via the host's token endpoint.

Returns a fixed set of credentials.

### Errors

Thrown when a call cannot be created.

Thrown when fetching a collection page fails.

Thrown when device token issuance or validation fails.

Thrown when DPoP key initialization fails.

Thrown when the SDK is rejected by the auth backend.

Thrown when a media track operation fails.

Thrown when an incoming message cannot be parsed.

Thrown when `getUserMedia` fails with `OverconstrainedError` and all fallback levels are exhausted.

Thrown when the preflight connectivity test fails.

Thrown when a recovery attempt fails.

Thrown when an access-token refresh fails.

Catch-all for unexpected SDK errors.

Thrown when a Verto ping/pong heartbeat fails.

## **Functions**

Creates a call using an embed token for simple, embeddable integrations.

Type guard that checks if a participant is the local `SelfParticipant`.

Retrieve the current SDK logger instance.

Replace the built-in logger with a custom implementation. Pass `null` to restore defaults.

Set the log level for the built-in logger. No effect when a custom logger is set via `setLogger()`.

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.