> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Settings & device events

> Events for camera startup, device availability and selection, and media send/receive settings.

These events fire when the camera starts or encounters an error, when input or output devices change, and when media send/receive settings are updated.

***

## started-camera

✓ Prebuilt✓ Custom

Fires when the local participant's camera starts. This happens as part of the standard join flow, or when explicitly calling [`startCamera()`](https://docs.daily.co/reference/daily-js/instance-methods/start-camera).

```json theme={null}
// Example event object
{
  "action": "started-camera",
  "callClientId": "17225364729060.9442072768918943"
}
```

***

## camera-error

✓ Prebuilt✓ Custom

Fires when a camera or microphone error occurs. The `error.type` field categorizes the problem; `error.msg` is a human-readable description.

> [!TIP]
>
> For more on handling device errors, see the [device permissions guide](https://docs.daily.co/docs/daily-js/guides/device-permissions.md).

**action** `string`

Always `"camera-error"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**error** `object`

Always contains `type` and `msg`. Some types include additional fields.

**error.type values**

**"not-found"** `DailyCamDeviceNotFoundError`

Camera and/or microphone not detected.

* `missingMedia` — `Array<'video' | 'audio'>` — which devices were not found

```json theme={null}
{ "type": "not-found", "msg": "No device found.", "missingMedia": ["video", "audio"] }
```

**"permissions"** `DailyCamPermissionsError`

User or browser blocked camera/microphone access.

* `blockedBy` — `'user'` or `'browser'`
* `blockedMedia` — `Array<'video' | 'audio'>` — which devices were blocked

```json theme={null}
{ "type": "permissions", "msg": "Permissions denied to the browser.", "blockedBy": "browser", "blockedMedia": ["video", "audio"] }
```

**"cam-in-use" | "mic-in-use" | "cam-mic-in-use"** `DailyCamInUseError`

Camera and/or microphone in use by another application. Windows only.

```json theme={null}
{ "type": "cam-in-use", "msg": "Camera in use by another application." }
```

**"constraints"** `DailyCamConstraintsError`

`getUserMedia()` was called with invalid or empty constraints.

* `reason` — `'invalid'` or `'none-specified'`
* `failedMedia` — `Array<'video' | 'audio'>` — which devices were affected

```json theme={null}
{ "type": "constraints", "msg": "Invalid constraints provided.", "reason": "invalid", "failedMedia": ["video"] }
```

**"undefined-mediadevices"** `DailyCamTypeError`

`window.navigator.mediaDevices` is undefined. Most commonly caused by accessing the call over `http` instead of `https`.

```json theme={null}
{ "type": "undefined-mediadevices", "msg": "navigator.mediaDevices is undefined. Check url for https." }
```

**"unknown"** `DailyCamUnknownError`

Uncategorized error. The original browser error message is in `msg`.

```json theme={null}
{ "type": "unknown", "msg": "Unknown device error (NotReadableError)" }
```

**errorMsg** `string | object` *deprecated*

Retained for backwards compatibility.

```javascript theme={null}
call.on('camera-error', ({ error }) => {
  if (error?.type === 'permissions') {
    showPermissionsPrompt(error.blockedBy);
  } else if (error?.type === 'not-found') {
    showNoDeviceMessage(error.missingMedia);
  } else {
    showGenericDeviceError(error?.msg);
  }
});
```

***

## available-devices-updated

✓ Prebuilt✓ Custom

Fires when a device becomes available or is removed — for example when a headset is connected or disconnected. See [`enumerateDevices()`](https://docs.daily.co/reference/daily-js/instance-methods/enumerate-devices) for details on the device properties returned.

**action** `string`

Always `"available-devices-updated"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**availableDevices** `MediaDeviceInfo[]`

An array of [`MediaDeviceInfo`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) objects representing all devices currently available to the browser.

```json theme={null}
// Example event object
{
  "action": "available-devices-updated",
  "callClientId": "17225364729060.9442072768918943",
  "availableDevices": [
    { "deviceId": "abc123", "groupId": "", "kind": "videoinput", "label": "Front Camera" },
    { "deviceId": "def456", "groupId": "", "kind": "audioinput", "label": "Built-in Microphone" },
    { "deviceId": "ghi789", "groupId": "", "kind": "audiooutput", "label": "Built-in Speakers" }
  ]
}
```

***

## selected-devices-updated

✓ Prebuilt✓ Custom

Fires when the participant selects a new input or output device. Unlike [`available-devices-updated`](#available-devices-updated), which fires whenever the system device list changes, this event only fires when the participant has actively chosen a different device.

**action** `string`

Always `"selected-devices-updated"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**devices** `object`

Contains `camera`, `mic`, and `speaker` keys with [`MediaDeviceInfo`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo)-shaped objects for the newly selected devices.

```json theme={null}
// Example event object
{
  "action": "selected-devices-updated",
  "callClientId": "17225364729060.9442072768918943",
  "devices": {
    "camera": {},
    "mic": {},
    "speaker": { "deviceId": "deviceId", "kind": "audiooutput", "label": "label", "groupId": "groupId" }
  }
}
```

***

## input-settings-updated

✓ Prebuilt✓ Custom

Fires every time the input settings object changes. Includes all current input settings, even those that did not change. See [`updateInputSettings()`](https://docs.daily.co/reference/daily-js/instance-methods/update-input-settings) for details on the settings shape.

**action** `string`

Always `"input-settings-updated"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**inputSettings** `object`

The full current input settings object, including `video` and `audio` keys with their `settings` and `processor` sub-objects.

```json theme={null}
// Example event object
{
  "action": "input-settings-updated",
  "callClientId": "17225364729060.9442072768918943",
  "inputSettings": {
    "video": {
      "settings": { "frameRate": 15 },
      "processor": { "type": "background-blur", "config": { "strength": 0.2 } }
    },
    "audio": {
      "settings": { "deviceId": "default", "echoCancellation": false },
      "processor": { "type": "noise-cancellation" }
    }
  }
}
```

***

## send-settings-updated

✓ Prebuilt✓ Custom

Fires when video or custom track send settings change. This fires once upon [`join()`](https://docs.daily.co/reference/daily-js/instance-methods/join) and again each time [`updateSendSettings()`](https://docs.daily.co/reference/daily-js/instance-methods/update-send-settings) is called.

**action** `string`

Always `"send-settings-updated"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**sendSettings** `object`

The full current send settings object. Contains per-track keys (`video`, `screenVideo`, `customVideoDefaults`) each with `maxQuality` and `encodings` sub-objects.

```json theme={null}
// Example event object
{
  "action": "send-settings-updated",
  "callClientId": "17225364729060.9442072768918943",
  "sendSettings": {
    "video": {
      "maxQuality": "high",
      "encodings": {
        "low": { "maxBitrate": 90000, "scaleResolutionDownBy": 4, "maxFramerate": 15 },
        "medium": { "maxBitrate": 200000, "scaleResolutionDownBy": 2, "maxFramerate": 15 },
        "high": { "maxBitrate": 680000, "scaleResolutionDownBy": 1, "maxFramerate": 30 }
      }
    },
    "screenVideo": {
      "maxQuality": "low",
      "encodings": {
        "low": { "maxBitrate": 2000000, "scaleResolutionDownBy": 1, "maxFramerate": 30 }
      }
    }
  }
}
```

***

## receive-settings-updated

✗ Prebuilt✓ Custom

Fires when media receive settings change. This fires once upon [`join()`](https://docs.daily.co/reference/daily-js/instance-methods/join) with the initial `base` settings, and again each time [`updateReceiveSettings()`](https://docs.daily.co/reference/daily-js/instance-methods/update-receive-settings) is called.

**action** `string`

Always `"receive-settings-updated"`.

**callClientId** `string`

The ID of the call client instance that emitted this event.

**receiveSettings** `DailyReceiveSettings`

A map of participant ID or `'base'` to receive settings. The `'base'` key holds the default settings applied to all participants. Additional keys are participant `session_id` values with per-participant overrides.

```json theme={null}
// Example event object
{
  "action": "receive-settings-updated",
  "callClientId": "17225364729060.9442072768918943",
  "receiveSettings": {
    "base": { "video": { "layer": 2 }, "screenVideo": { "layer": 0 } },
    "f2190c86-169a-464f-c0a4-ee1d5c00af58": { "video": { "layer": 0 } }
  }
}
```

## See also

> [card] Methods
>
> * [startCamera()](https://docs.daily.co/reference/daily-js/instance-methods/start-camera.md)
> * [enumerateDevices()](https://docs.daily.co/reference/daily-js/instance-methods/enumerate-devices.md)
> * [updateInputSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-input-settings.md)
> * [updateSendSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-send-settings.md)
> * [updateReceiveSettings()](https://docs.daily.co/reference/daily-js/instance-methods/update-receive-settings.md)

> [card] Guides
>
> * [Audio and video](https://docs.daily.co/docs/daily-js/guides/audio-video.md)
> * [Device permissions](https://docs.daily.co/docs/daily-js/guides/device-permissions.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.