findDeviceFromConstraints
function findDeviceFromConstraints(constraints, devices):
| boolean
| MediaDeviceInfoLike
| undefined;
Find device from the device list with provided constraints
Parameters
| Parameter | Type | Description |
|---|---|---|
constraints | | InputDeviceConstraint | undefined | The constraints to be used for the lookup |
devices | IndexedDevices | The devices to be used for the lookup |
Returns
| boolean
| MediaDeviceInfoLike
| undefined
true means it can be any devices, undefined means not found,
otherwise, the matched device will be returned