Skip to main content

areMultipleFacingModeSupported

function areMultipleFacingModeSupported(currentDevices, getSupportedConstraints): boolean;

An utility function to check if facing mode is supported by interpreting the device label and the API getSupportedConstraints

Parameters

ParameterTypeDescription
currentDevicesMediaDeviceInfoLike[]Current list of devices available
getSupportedConstraints() => MediaTrackSupportedConstraintsA function to get supported constraints, i.e. navigator.mediaDevices.getSupportedConstraints()

Returns

boolean

Remarks

Only support snooping the label for English