getCurrentDevice method
Get the currently used device (Support for macOS, Windows and web 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 TRTCCloudDef.TXMediaDeviceTypeMic、TRTCCloudDef.TXMediaDeviceTypeSpeaker, or TRTCCloudDef.TXMediaDeviceTypeCamera.
deviceId Device ID obtained from getDevicesList
Return:
ITRTCDeviceInfo device information, from which the device ID and device name can be obtained
Implementation
Future<Map?> getCurrentDevice(int type
) async {
var result = await _channel.invokeMapMethod('getCurrentDevice', {
"type": type
});
return V2TXLiveFlutterResult.mapValue(result);
}