Skip to navigation

setAudioInputDeviceConstraints

View as MarkdownOpen in Claude
setAudioInputDeviceConstraints(constraints): Promise<boolean>

Updates the audio input track constraints for the active call.

Parameters

constraints
MediaTrackConstraintsRequired

Media-track constraints to apply to the current audio input. See MediaTrackConstraints.

Returns

Promise<boolean> — whether the constraints reached the media the call is sending.

false is an outcome, not an error: the leg may have no live sender of that kind, or may carry media the SDK did not capture and may not replace (an inputAudioStream/inputVideoStream you supplied, a display capture, or pipeline output). Any failure behind a false is also reported on call.errors$, so a caller that ignores the return value still learns of it there. A UI that reflects the change must read it.

Examples

const applied = await selfParticipant.setAudioInputDeviceConstraints({
echoCancellation: false,
noiseSuppression: false
});
if (!applied) {
toast('This input cannot be reconfigured mid-call.');
}