setSystemVolumeType method

Future<void> setSystemVolumeType(
  1. int type
)

Set the system volume type used in call (supports only the Android and iOS platforms)

Smartphones usually have two system volume types, i.e., call volume and media volume.

Currently, the SDK provides three control modes of system volume types, including:

Note:

  • This API must be called before TRTCCloud.startLocalAudio is called.

  • If you have no special requirements, we recommend you not set it by yourself. You just need to set your scenario through TRTCCloud.enterRoom, and the SDK will automatically select the matching volume type internally.

Parameters:

type System volume type. If you have no special requirements, we recommend you not set it by yourself.

Implementation

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