DeviceCollectionImpl constructor
DeviceCollectionImpl(
- NERtcDeviceType type, {
- NERtcDeviceUsage usage = NERtcDeviceUsage.capture,
Implementation
DeviceCollectionImpl(this.type, {this.usage = NERtcDeviceUsage.capture}) {
if (type == NERtcDeviceType.video) {
// video capture devices.
Map<String, dynamic> convertJson = {
"method": InvokeMethod.kNERtcEnumerateCaptureDevices,
};
InvokeMethod_(jsonEncode(convertJson));
} else {
Map<String, dynamic> convertJson = {
"method": InvokeMethod.kNERtcEnumerateAudioDevices,
"usage": this.usage.index
};
InvokeMethod_(jsonEncode(convertJson));
}
}