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

# useInputSettings

> Convenience hook around getInputSettings() and updateInputSettings().

`useInputSettings(params?) : Object`

## Parameters (optional)

<ParamField body="onError" type="Function">
  Callback for the [`'input-settings-error'`](/reference/daily-js/events/error-events#nonfatal-error) event.
</ParamField>

<ParamField body="onInputSettingsUpdated" type="Function">
  Callback for the [`input-settings-updated`](/reference/daily-js/events/settings-events#input-settings-updated) event.
</ParamField>

## Return value

An object with the following properties:

<ResponseField name="errorMsg" type="string">
  Details an input settings error. Defaults to `null`.
</ResponseField>

<ResponseField name="inputSettings" type="Object">
  The settings for the participant. See `daily-js` instance method [`getInputSettings()`](/reference/daily-js/instance-methods/get-input-settings) for an overview of input settings.
</ResponseField>

<ResponseField name="updateInputSettings" type="Function">
  Updates input settings, equivalent to calling the `daily-js` [`updateInputSettings()`](/reference/daily-js/instance-methods/update-input-settings) method.
</ResponseField>

<Warning>
  Any calls to `updateInputSettings()` before the meeting is joined will be silently ignored.
</Warning>

## Example

```tsx theme={null}
import { DailyEventObjectInputSettingsUpdated } from '@daily-co/daily-js';
import { useInputSettings } from '@daily-co/daily-react';
import React, { useCallback, useState } from 'react';

export const UseInputSettingsDemo = () => {
  const [, setErrorMessage] = useState('No error!');

  const { updateInputSettings, errorMsg } = useInputSettings({
    onError: useCallback(() => {
      setErrorMessage(errorMsg);
    }, [errorMsg]),

    onInputSettingsUpdated: useCallback(
      (event: DailyEventObjectInputSettingsUpdated) => {
        console.log(
          'Input settings updated:',
          event.inputSettings?.video?.processor
        );
      },
      []
    ),
  });

  const enableBackgroundBlur = () => {
    updateInputSettings({
      video: {
        processor: {
          type: 'background-blur',
          config: { strength: 0.5 },
        },
      },
    });
  };

  return (
    <div>
      <button type="button" onClick={enableBackgroundBlur}>
        Enable background blur
      </button>
    </div>
  );
};
```

## See also

<CardGroup>
  <Card title="daily-js methods" icon="code" iconType="solid">
    * [getInputSettings()](/reference/daily-js/instance-methods/get-input-settings)
    * [updateInputSettings()](/reference/daily-js/instance-methods/update-input-settings)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [input-settings-updated](/reference/daily-js/events/settings-events#input-settings-updated)
    * [input-settings-error (nonfatal-error)](/reference/daily-js/events/error-events#nonfatal-error)
  </Card>
</CardGroup>
