setCurrentDeviceVolume method

Future<int?> setCurrentDeviceVolume(
  1. int type,
  2. int volume
)

Set 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.

volume Volume

Return:

ITRTCDeviceInfo device information, from which the device ID and device name can be obtained

Implementation

Future<int?> setCurrentDeviceVolume(int type, int volume) async {
  var result = await _channel.invokeMethod('setCurrentDeviceVolume', {
    "type": type,
    "volume": volume
  });
  return V2TXLiveFlutterResult.intValue(result);
}