updateInputSettings()

updateInputSettings({inputSettings})

Compatibility:
Prebuilt
Custom

Updates settings applied to local media inputs during a Daily call. Returns a Promise that does not resolve until settings are updated.

A successful call to updateInputSettings() triggers an 'input-settings-updated' event. 'nonfatal-error' fires on errors.

{inputSettings}

Input settings are passed as an object with video or audio as a key. Both video and audio take an object for defining its settings, for which there is currently only one: the processor, keyed on processor. processor takes yet another object specifying the type and config values.

Video processor

For video objects, type has the following allowed values: "none", "background-image", "background-blur" and "face-detection". Changing type to "none" turns off the video processor.

  • Video processors are currently only supported on desktop browsers.

  • Also, only one video processor type can be applied at a time. For example, changing type to face-detection turns off the background-image and background-blur video processors.

Setting type to "background-blur" obscures the local participant's background.

If "background-blur" is enabled, then an additional strength value can be passed to config. The strength value is a float greater than 0 and less than or equal to 1, with 1 being the default and strongest blur.

Setting type to "background-image" will replace the participant's background with the image passed in the config property. The nested source property should be set to either an HTTP or data URI. Supported file extensions are .jpg, .jpeg, and .png.

Example 1: Set your background-image using a hosted file:

Example 2: Set your background-image using Data URI, supplied by an ArrayBuffer. Note that there are many ways to provide an ArrayBuffer, this example shows how to use the FileReader API:

Setting type to "face-detection" doesn't apply any changes to the participant's background. However, it starts the identification of the number of people in view at a given time and triggers the face-counts-updated event when the face count has been updated.

Audio processor

For audio objects, type has two allowed values: "none" and "noise-cancellation". If "noise-cancellation" is set, changing type to "none" turns off the audio processor.

"noise-cancellation" is supported on the following browsers:

  • Desktop:

    • Safari (version 17.4.1 and newer)
    • Firefox
    • Chromium-based browsers (e.g. Chrome, Edge, Brave)
  • Mobile:

    • iOS Safari (version 17.4.1 and newer)

Setting type to "noise-cancellation" reduces background noise on the microphone input.