enumerateDevices method

  1. @override
Future<List<MediaDeviceInfo>> enumerateDevices()
override

Returns a List of MediaDeviceInfo describing the devices.

Implementation

@override
Future<List<MediaDeviceInfo>> enumerateDevices() async {
  var _source = await getSources();
  return _source
      .map(
        (e) => MediaDeviceInfo(
            deviceId: e['deviceId'],
            groupId: e['groupId'],
            kind: e['kind'],
            label: e['label']),
      )
      .toList();
}