Skip to main content
cycleMic() Prebuilt Custom This method is a wrapper around updateInputSettings() and triggers an 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, or null if no device was found.

Example

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

See also