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

# cycleMic()

> Switch the local microphone to the next available device.

`cycleMic()`

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

This method is a wrapper around [`updateInputSettings()`](/reference/daily-js/instance-methods/update-input-settings) and triggers an [`input-settings-updated`](/reference/daily-js/events/settings-events#input-settings-updated) event on success. Has no effect if only one microphone is available.

## Return value

Returns a `Promise<{ device?: MediaDeviceInfo | null }>` resolving with the newly active microphone's [`MediaDeviceInfo`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo), or `null` if no device was found.

## Example

```javascript theme={null}
const { device } = await call.cycleMic();
if (device) {
  console.log('Switched to:', device.label);
}
```

## See also

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

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

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