Skip to main content

hasAnyInputs

function hasAnyInputs(devices, grantedOnly): [boolean, boolean];

Check if provided devices have any video and audio inputs

Parameters

ParameterTypeDefault valueDescription
devicesMediaDeviceInfoLike[]undefinedThe devices to lookup
grantedOnlybooleanfalseWhen it is true, the device label is also taken into consideration

Returns

[boolean, boolean]

A tuple of [anyAudioInput, anyVideoInput], e.g. [true, false] means there is audio input but no video input

Default Value

false