Skip to main content
getInputDevices() Returns a Promise<DailyDeviceInfos> describing the camera, microphone, and speaker devices currently in use for the call. Handy for building your device selector UI or for debugging. To get a list of all available devices (not just the active ones), use enumerateDevices(). If a device has not been specified or has not yet been acquired, its field will be an empty object {}. The field will also be empty if a custom track has been provided for that input.

Return value

Returns a Promise<DailyDeviceInfos>:
camera
DailyMediaDeviceInfo | {}
The currently selected camera (video input device). DailyMediaDeviceInfo extends the browser MediaDeviceInfo with an optional facing field ('user' or 'environment').
mic
MediaDeviceInfo | {}
The currently selected microphone (audio input device). See MediaDeviceInfo for the full shape.
speaker
MediaDeviceInfo | {}
The currently selected speaker or audio output device. See MediaDeviceInfo for the full shape.

Example

const { camera, mic, speaker } = await call.getInputDevices();

console.log('Camera:', camera.label || camera.deviceId);
console.log('Mic:', mic.label || mic.deviceId);
console.log('Speaker:', speaker.label || speaker.deviceId);

See also