setSystemVolumeType method

Future<int?> 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:

  • TXSystemVolumeType.TXSystemVolumeTypeAuto "Call on the microphone, media under the microphone", that is, the call volume is used when the anchor is on the microphone, and the media volume is used when the audience is not on the microphone, which is suitable for online live broadcast scenarios.

  • TXSystemVolumeType.TXSystemVolumeTypeVOIP The call volume is used throughout the call, which is suitable for multi-person conference scenarios.

  • TXSystemVolumeType.TXSystemVolumeTypeMedia The media volume is used throughout the call, which is not commonly used, and is suitable for some application scenarios with special needs (such as the anchor's external sound card).

Note:

  • If you have no special requirements, it is not recommended that you set it yourself, and the SDK will automatically select the corresponding volume type.

Parameters:

type If there are no special requirements, it is not recommended that you set the system volume type by yourself. Reference: TXSystemVolumeType

Implementation

Future<int?> setSystemVolumeType(int type) async {
  var result = await _channel.invokeMethod('setSystemVolumeType', {
    "type": type,
  });
  return V2TXLiveFlutterResult.intValue(result);
}