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

Returned value:

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

Implementation

Future<int?> setCurrentDeviceVolume(int type, int volume) {
  return _channel.invokeMethod('setCurrentDeviceVolume', {"type": type, "volume": volume});
}