Skip to navigation

setInputDevicesConstraints

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

Updates both audio and video input track constraints for the active call.

Parameters

constraints
{ audio: MediaTrackConstraints; video: MediaTrackConstraints; }Required

Constraints for both audio and video input devices. See MediaTrackConstraints.

Returns

Promise<boolean> — whether both kinds took the constraints.

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

await selfParticipant.setInputDevicesConstraints(constraints);