Skip to main content
updateInputSettings(inputSettings) 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 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

audio
object
Settings for the local microphone.
video
object
Settings for the local camera.

Return value

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

Providing custom constraints

settings accepts a MediaTrackConstraints object. Specify all constraints you want applied — they replace existing constraints entirely and are not merged.
call.updateInputSettings({
  video: {
    settings: {
      deviceId: 'a1b2c3d4...',
      aspectRatio: 1,
    },
  },
});
To change just the deviceId without affecting other constraints, use setInputDevicesAsync() — it merges the new deviceId with existing constraints.
Daily’s default constraints handle cross-browser inconsistencies. Overriding them via settings bypasses these defaults. If you need custom constraints, refer to the MediaTrackConstraints documentation and test across platforms carefully.

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

Video processors are currently only supported on desktop browsers.
background-blur — obscures the participant’s background. Optionally accepts config.strength (float 0–1, default 1).
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.
// Using a hosted image URL
call.updateInputSettings({
  video: {
    processor: {
      type: 'background-image',
      config: { source: 'https://example.com/bg.jpg' },
    },
  },
});
// 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 events. Does not alter the video.
call.updateInputSettings({
  video: { processor: { type: 'face-detection' } },
});

Audio processor

'noise-cancellation' is supported on:
  • Desktop: Chrome/Chromium, Firefox, Safari 17.4.1+
  • Mobile: iOS Safari 17.4.1+
noise-cancellation — reduces background noise on the microphone input.
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. In addition:
  • Settings errors — If the constraints provided result in a getUserMedia() error, a 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 or 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