Skip to main content

relaxInputConstraint

function relaxInputConstraint(
kind,
input,
devices):
| undefined
| InputDeviceConstraint;

Relax input constraints to enable looking up the device by deviceId as well as label as a fallback as a best effort to get a similar device when possible. If the the device is found we will use the exact constraint otherwise we will use the ideal.

Parameters

ParameterTypeDescription
kind"audioinput" | "videoinput"-
input| undefined | InputDeviceConstraintThe input constraints to be relaxed
devicesIndexedDevicesThe current device list

Returns

| undefined | InputDeviceConstraint