Skip to main content
enumerateDevices() This is a wrapper around navigator.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() instead.

Return value

Returns a Promise<{ devices: DailyMediaDeviceInfo[] }>. Each DailyMediaDeviceInfo extends the browser’s MediaDeviceInfo with an optional facing field:
deviceId
string
Unique identifier for the device. Persists across sessions for the same browser and origin.
groupId
string
Devices that share a physical unit (e.g. a combined camera and microphone) have the same groupId.
kind
string
Device type: 'audioinput', 'audiooutput', or 'videoinput'.
label
string
Human-readable device name (e.g. "Built-in Microphone"). Only populated after the user has granted media permissions.
facing
string
Optional. Camera facing mode on mobile devices: 'user' (front-facing) or 'environment' (rear-facing).

Example

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