getSources static method

Future<List> getSources()

Implementation

static Future<List<dynamic>> getSources() async {
  final devices = await HTML.window.navigator.mediaDevices!.enumerateDevices();
  final result = [];
  for (final device in devices) {
    result.add(<String, String>{
      'deviceId': device.deviceId,
      'groupId': device.groupId,
      'kind': device.kind,
      'label': device.label
    });
  }
  return result;
}