getCurrentDevice method Null safety
- int type
Get the currently used device
Note: this API supports only the macOS and Windows platforms
Parameters:
type Device type, which specifies the type of devices to be obtained. For more information, please see the definition of TXMediaDeviceType. type can only be TXMediaDeviceTypeMic, TXMediaDeviceTypeSpeaker, or TXMediaDeviceTypeCamera.
deviceId Device ID obtained from getDevicesList
Returned value:
ITRTCDeviceInfo device information, from which the device ID and device name can be obtained
Implementation
Future<Map?> getCurrentDevice(int type
) {
return _channel.invokeMethod('getCurrentDevice', {
"type": type
});
}