getDevices method
Gets a list of audio devices filtered based on |filter|.
|filter|: Device properties by which to filter the list of returned
audio devices. If the filter is not set or set to {}
,
returned device list will contain all available audio devices.
|callback|: Reports the requested list of audio devices.
Implementation
Future<List<AudioDeviceInfo>> getDevices(DeviceFilter? filter) async {
var $res = await promiseToFuture<JSArray>(
$js.chrome.audio.getDevices(filter?.toJS));
return $res.toDart
.cast<$js.AudioDeviceInfo>()
.map((e) => AudioDeviceInfo.fromJS(e))
.toList();
}