setCurrentDeviceMute method

Future<int?> setCurrentDeviceMute(
  1. int type,
  2. bool mute
)

Set the mute status 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.

mute Whether to mute/freeze

Returned value:

0: success; negative number: failure

Implementation

Future<int?> setCurrentDeviceMute(int type, bool mute) {
  return _channel
      .invokeMethod('setCurrentDeviceMute', {"type": type, "mute": mute});
}