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

# enumerateDevices()

> Returns a list of available audio and video input/output devices.

`enumerateDevices()`

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

This is a wrapper around [`navigator.mediaDevices.enumerateDevices()`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices). It is especially required for iframe embeds, which return different device IDs than the parent page and must be enumerated from within the iframe context. To get the devices currently active in the call, use [`getInputDevices()`](/reference/daily-js/instance-methods/get-input-devices) instead.

## Return value

Returns a `Promise<{ devices: DailyMediaDeviceInfo[] }>`. Each `DailyMediaDeviceInfo` extends the browser's [`MediaDeviceInfo`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) with an optional `facing` field:

<ResponseField name="deviceId" type="string">
  Unique identifier for the device. Persists across sessions for the same browser and origin.
</ResponseField>

<ResponseField name="groupId" type="string">
  Devices that share a physical unit (e.g. a combined camera and microphone) have the same `groupId`.
</ResponseField>

<ResponseField name="kind" type="string">
  Device type: `'audioinput'`, `'audiooutput'`, or `'videoinput'`.
</ResponseField>

<ResponseField name="label" type="string">
  Human-readable device name (e.g. `"Built-in Microphone"`). Only populated after the user has granted media permissions.
</ResponseField>

<ResponseField name="facing" type="string">
  Optional. Camera facing mode on mobile devices: `'user'` (front-facing) or `'environment'` (rear-facing).
</ResponseField>

## Example

```javascript theme={null}
const { devices } = await call.enumerateDevices();

const cameras = devices.filter(d => d.kind === 'videoinput');
const mics = devices.filter(d => d.kind === 'audioinput');
const speakers = devices.filter(d => d.kind === 'audiooutput');

console.log('Cameras:', cameras.map(d => d.label));
```

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [updateInputSettings()](/reference/daily-js/instance-methods/update-input-settings)
    * [setInputDevicesAsync()](/reference/daily-js/instance-methods/set-input-devices-async)
    * [setOutputDeviceAsync()](/reference/daily-js/instance-methods/set-output-device-async)
    * [getInputDevices()](/reference/daily-js/instance-methods/get-input-devices)
  </Card>

  <Card title="Events" icon="bolt" iconType="solid">
    * [available-devices-updated](/reference/daily-js/events/settings-events#available-devices-updated)
    * [selected-devices-updated](/reference/daily-js/events/settings-events#selected-devices-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>
