cameraAvailable static method
Implementation
static Future<bool> cameraAvailable() async {
List<dynamic> sources =
await html.window.navigator.mediaDevices!.enumerateDevices();
print("sources:");
// List<String> vidIds = [];
bool hasCam = false;
for (final e in sources) {
print(e);
if (e.kind == 'videoinput') {
// vidIds.add(e['deviceId']);
hasCam = true;
}
}
return hasCam;
}