setCurrentDeviceVolume method

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

设置当前设备的音量

注意:此接口只支持Mac和Windows平台

参数:

type 设备类型,指定需要获取哪种设备的列表。详见TXMediaDeviceType定义,type 只支持 TXMediaDeviceTypeMic、TXMediaDeviceTypeSpeaker。

volume 音量大小

返回:

ITRTCDeviceInfo 设备信息,能获取设备 ID 和设备名称

Implementation

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