31402: UserMedia Acquisition Failed
VOICE
ERROR
This error occurs when the browser has microphone permission, but the Voice JavaScript SDK cannot acquire the input media stream for a call. This usually points to an invalid device selection, overly restrictive getUserMedia() constraints, or a browser, operating system, or hardware issue.
- A
deviceIdpassed todevice.audio.setInputDevice()does not exist or is no longer available. - The
rtcConstraintspassed todevice.connect()are too restrictive, sogetUserMedia()cannot match an available device. - Audio constraints applied with
device.audio.setAudioConstraints()cannot be satisfied by the selected microphone. - The browser, operating system, or local audio hardware cannot provide the microphone stream even after permission is granted.
- Verify that the selected microphone exists in
device.audio.availableInputDevicesbefore you calldevice.audio.setInputDevice(). - Remove custom
rtcConstraintsor other audio constraints and test again with a simpler input request such asaudio: true. - If you apply constraints with
device.audio.setAudioConstraints(), clear them withdevice.audio.unsetAudioConstraints()and retry. - Call
getUserMedia()before you create theDeviceso you can detect microphone and device issues earlier and refresh the available device list before a call starts. - Test with the default input device first, then confirm the microphone works in the browser and operating system.