> ## 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.

# updateInputSettings()

> Updates local camera and microphone settings, including background effects and noise cancellation.

`updateInputSettings(inputSettings)`

<Badge color="green">{"✓"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

Updates settings applied to local media inputs during a call. Returns a `Promise` that resolves once settings are applied and triggers an [`input-settings-updated`](/reference/daily-js/events/settings-events#input-settings-updated) event when settings change.

Only the keys you provide are updated — omitting `audio` leaves audio settings unchanged, and vice versa. However, within `settings` or `processor`, you must specify all values you want applied; they are not merged with existing values.

## Parameters

<ParamField body="audio" type="object">
  Settings for the local microphone.

  <Expandable title="properties" defaultOpen="true">
    <ParamField body="audio.settings" type="MediaTrackConstraints | { customTrack: MediaStreamTrack }">
      Constraints to apply to the audio track, or a custom track to use instead. See [Providing custom constraints](#providing-custom-constraints) and [Providing a custom track](#providing-a-custom-track) below.
    </ParamField>

    <ParamField body="audio.processor" type="object">
      Audio processor to apply.

      <Expandable title="properties" defaultOpen="true">
        <ParamField body="audio.processor.type" type="'none' | 'noise-cancellation'" required>
          The processor type. Set to `'none'` to disable processing.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="video" type="object">
  Settings for the local camera.

  <Expandable title="properties" defaultOpen="true">
    <ParamField body="video.settings" type="MediaTrackConstraints | { customTrack: MediaStreamTrack }">
      Constraints to apply to the video track, or a custom track to use instead. See [Providing custom constraints](#providing-custom-constraints) and [Providing a custom track](#providing-a-custom-track) below.
    </ParamField>

    <ParamField body="video.processor" type="object">
      Video processor to apply. Only one processor type can be active at a time — setting a new type disables the previous one.

      <Expandable title="properties" defaultOpen="true">
        <ParamField body="video.processor.type" type="'none' | 'background-blur' | 'background-image' | 'face-detection'" required>
          The processor type. Set to `'none'` to disable processing.
        </ParamField>

        <ParamField body="video.processor.config" type="object">
          Additional processor configuration. Only applies to `background-blur` and `background-image`.

          <Expandable title="properties">
            <ParamField body="video.processor.config.source" type="string | ArrayBuffer">
              Image source for `background-image`. Accepts an HTTP/HTTPS URL or an `ArrayBuffer`. Supported formats: `.jpg`, `.jpeg`, `.png`.
            </ParamField>

            <ParamField body="video.processor.config.strength" type="number">
              Blur strength for `background-blur`. Float between 0 and 1 (exclusive/inclusive). Default: `1` (strongest blur).
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Return value

Returns `Promise<{ inputSettings: DailyInputSettings }>` that resolves once settings are applied.

## Providing custom constraints

`settings` accepts a [`MediaTrackConstraints`](https://w3c.github.io/mediacapture-main/#media-track-constraints) object. Specify all constraints you want applied — they replace existing constraints entirely and are not merged.

```javascript theme={null}
call.updateInputSettings({
  video: {
    settings: {
      deviceId: 'a1b2c3d4...',
      aspectRatio: 1,
    },
  },
});
```

<Note>
  To change just the `deviceId` without affecting other constraints, use [`setInputDevicesAsync()`](/reference/daily-js/instance-methods/set-input-devices-async) — it merges the new `deviceId` with existing constraints.
</Note>

<Warning>
  Daily's default constraints handle cross-browser inconsistencies. Overriding them via `settings` bypasses these defaults. If you need custom constraints, refer to the [`MediaTrackConstraints`](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints) documentation and test across platforms carefully.
</Warning>

## Providing a custom track

Pass `{ customTrack: track }` as `settings` to use a `MediaStreamTrack` you manage directly. When a custom track is provided, any existing constraints are cleared.

<Warning>
  You are responsible for the lifecycle of the custom track — Daily will not stop it for you. To hand control back to Daily, call `updateInputSettings()` with empty settings.
</Warning>

```javascript theme={null}
const stream = await navigator.mediaDevices.getUserMedia({ video: true });
call.updateInputSettings({
  video: { settings: { customTrack: stream.getVideoTracks()[0] } },
});

// To hand control back to Daily:
call.updateInputSettings({ video: { settings: {} } });
```

## Video processor

<Warning>
  Video processors are currently only supported on desktop browsers.
</Warning>

**`background-blur`** — obscures the participant's background. Optionally accepts `config.strength` (float 0–1, default `1`).

```javascript theme={null}
call.updateInputSettings({
  video: { processor: { type: 'background-blur', config: { strength: 0.5 } } },
});
```

**`background-image`** — replaces the background with an image. Accepts an HTTP URL or `ArrayBuffer` as `config.source`. Supported formats: `.jpg`, `.jpeg`, `.png`.

```javascript theme={null}
// Using a hosted image URL
call.updateInputSettings({
  video: {
    processor: {
      type: 'background-image',
      config: { source: 'https://example.com/bg.jpg' },
    },
  },
});
```

```javascript theme={null}
// Using an ArrayBuffer from a file input (via FileReader API)
document.getElementById('setImageBackground').addEventListener('click', function () {
  const file = document.getElementById('imageInput').files[0];
  if (!file) return;

  const reader = new FileReader();
  reader.onload = function () {
    call.updateInputSettings({
      video: {
        processor: {
          type: 'background-image',
          config: { source: reader.result },
        },
      },
    });
  };
  reader.readAsArrayBuffer(file);
});
```

**`face-detection`** — detects the number of faces visible and triggers [`face-counts-updated`](/reference/daily-js/events/media-events#face-counts-updated) events. Does not alter the video.

```javascript theme={null}
call.updateInputSettings({
  video: { processor: { type: 'face-detection' } },
});
```

## Audio processor

<Warning>
  `'noise-cancellation'` is supported on:

  * Desktop: Chrome/Chromium, Firefox, Safari 17.4.1+
  * Mobile: iOS Safari 17.4.1+
</Warning>

**`noise-cancellation`** — reduces background noise on the microphone input.

```javascript theme={null}
call.updateInputSettings({
  audio: { processor: { type: 'noise-cancellation' } },
});
```

## Error handling

Invalid fields or wrong types throw immediately. Errors during application emit a `nonfatal-error` event of type [`input-settings-error`](/reference/daily-js/events/error-events#input-settings-error). In addition:

* **Settings errors** — If the constraints provided result in a `getUserMedia()` error, a [`camera-error`](/reference/daily-js/events/settings-events#camera-error) will also be emitted and the input will likely be muted (There are scenarios where if the device was already on and only a minor constraint was being applied, the device can remain on). When a constraints error occurs, the settings are reset to defaults so that they do not repeatedly cause issues. Note: If the device is off or has not been initialized at the time of the update, the issue will not be detected until the device is turned on and only the `camera-error` event will be emitted. The settings will still be cleared and an `input-settings-updated` event will be emitted with the cleared settings.

* **Processor errors** — If an error occurs after the settings have been applied and the processor has started, a nonfatal-error of type [`video-processor-error`](/reference/daily-js/events/error-events#video-processor-error) or [`audio-processor-error`](/reference/daily-js/events/error-events#audio-processor-error) will be emitted. The processor will be turned off and the processor settings will be cleared. An `input-settings-updated` event will also be emitted with the cleared settings. For video processor failures, the video will be turned off to ensure the user is not broadcasting unintended content.

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [getInputSettings()](/reference/daily-js/instance-methods/get-input-settings)
    * [setInputDevicesAsync()](/reference/daily-js/instance-methods/set-input-devices-async)
    * [cycleCamera()](/reference/daily-js/instance-methods/cycle-camera)
    * [cycleMic()](/reference/daily-js/instance-methods/cycle-mic)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [input-settings-updated](/reference/daily-js/events/settings-events#input-settings-updated)
    * [face-counts-updated](/reference/daily-js/events/media-events#face-counts-updated)
    * [input-settings-error](/reference/daily-js/events/error-events#input-settings-error)
    * [video-processor-error](/reference/daily-js/events/error-events#video-processor-error)
    * [audio-processor-error](/reference/daily-js/events/error-events#audio-processor-error)
    * [camera-error](/reference/daily-js/events/settings-events#camera-error)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Audio and video processing](/docs/daily-js/guides/audio-video#audio-and-video-processing)
    * [Audio and video](/docs/daily-js/guides/audio-video)
  </Card>
</CardGroup>
