setSystemVolumeType method

Future<void> setSystemVolumeType(
  1. int type
)

设置通话中使用的系统音量类型(仅适用于 Android 和 iOS 平台)

手机通常有两种系统音量类型,即通话音量和媒体音量。

目前 SDK 提供了三种系统音量类型的控制模式,包括:

注意:

  • 此 API 必须在 TRTCCloud.startLocalAudio 调用前调用。

  • 如果没有特殊需求,我们建议您不要自己设置,只需要通过 TRTCCloud.enterRoom 设置您的场景,SDK 内部会自动选择匹配的音量类型。

参数:

type 系统音量类型。如果没有特殊需求,我们建议您不要自己设置。

Implementation

Future<void> setSystemVolumeType(
    int type // System volume type. For more information, please see `TRTCSystemVolumeType`. Default value: TRTCSystemVolumeTypeAuto
    ) {
  return _channel.invokeMethod('setSystemVolumeType', {
    "type": type,
  });
}