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", and "background-blur". If "background-blur" or "background-image" is set, changing type to "none" turns off the video processor.

"background-blur" and "background-image" are currently only supported on desktop browsers.

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:

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 currently only supported on desktop Firefox and Chromium-based browsers (such as Chrome).

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