getCurrentDeviceVolume method
Get the volume of the current device (Support for 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 TRTCCloudDef.TXMediaDeviceTypeMic
or TRTCCloudDef.TXMediaDeviceTypeSpeaker
.
Return:
Volume
Implementation
Future<int?> getCurrentDeviceVolume(int type
) async {
var result = await _channel.invokeMethod('getCurrentDeviceVolume', {
"type": type
});
return V2TXLiveFlutterResult.intValue(result);
}