extras parameter configuration

Updated at:

This topic describes the configuration, scenarios, and implementation of the extras parameter.

Features

The following table lists the features that you can configure using the extras parameter.

Parameter

Feature description

Value

Supported platforms

user_specified_aec

Audio 3A: Acoustic Echo Cancellation (AEC).

TRUE: Enables the feature. FALSE: Disables the feature.

Android, iOS, Mac, and Windows

user_specified_ans

Audio 3A: Automatic Noise Suppression (ANS).

TRUE: Enables the feature. FALSE: Disables the feature.

Android, iOS, Mac, and Windows

user_specified_agc

Audio 3A: Automatic Gain Control (AGC).

TRUE: Enables the feature. FALSE: Disables the feature.

Android, iOS, Mac, and Windows

user_specified_engine_mode

Audio quality mode.

Audio quality mode values

Android, iOS, Mac, and Windows

user_specified_scene_mode

Scenario mode.

Scenario mode values

Android, iOS, Mac, and Windows

user_specified_video_preprocess

Processes video using a third-party retouching SDK.

TRUE: Enables the feature. FALSE: Disables the feature.

Android and iOS

user_specified_groupid

One-to-one mode.

1v1

Android, iOS, Mac, and Windows

no_wifi_rssi_data

Do not collect Wi-Fi RSSI data.

TRUE: Does not collect data. FALSE (default): Collects data.

Android

no_phone_state_listen_data

Do not listen for incoming call status.

TRUE: Does not listen. FALSE (default): Listens.

Android

no_cpu_number_data

Do not collect CPU core count information.

TRUE: Does not collect data. FALSE (default): Collects data.

Android

Audio 3A

Scenarios

  • If the hardware audio processing on mobile devices (Android and iOS) does not meet your requirements, set all three parameters to TRUE. This enables the software audio processing algorithms provided by Alibaba Cloud RTC. The audio effect is the same as that in music mode or media mode.

  • If a PC or mobile device is connected to an external sound card that has built-in audio signal processing, set the relevant parameters to FALSE to preserve the original audio quality.

  • If you do not set any 3A parameters, the 3A features are not enabled. The SDK operates in the currently selected mode, such as default mode or music mode.

Implementation

JsonObject jsonObject = new JsonObject();

jsonObject.put("user_specified_aec","TRUE");
jsonObject.put("user_specified_ans","TRUE");
jsonObject.put("user_specified_agc","TRUE");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

Audio quality and scenario modes

Features

  • For professional scenarios that require high-quality sound effects, Alibaba Cloud RTC provides multiple configuration combinations.

  • Developers can customize audio properties for different audio quality requirements and scenarios to achieve an optimal real-time interactive experience.

Mode descriptions

  • Audio quality mode

    Audio quality mode value

    Mode name

    Number of sound channels

    Sample rate

    Encoding bitrate

    ENGINE_LOW_QUALITY_MODE

    Low quality mode

    1

    8 kHz

    12 Kbps

    ENGINE_BASIC_QUALITY_MODE

    Standard quality mode

    1

    16 kHz

    24 Kbps

    ENGINE_HIGH_QUALITY_MODE

    High quality mode

    1

    48 kHz

    48 Kbps

  • Scenario mode

    Scenario mode value

    Scenario name

    Attribute

    SCENE_DEFAULT_MODE

    Default scenario

    Recommended for general real-time communication scenarios.

    SCENE_EDUCATION_MODE

    Education scenario

    Prioritizes audio continuity and stability.

    SCENE_MEDIA_MODE

    Media scenario

    Preserves the quality of human voices and music. Recommended for co-streaming in live channels.

    SCENE_MUSIC_MODE

    Music scenario

    Provides high-fidelity music quality. Recommended for scenarios with high requirements for music quality, such as musical instrument instruction.

Example scenario combinations

Scenario

Audio quality mode

Scenario mode

Attribute

Standard voice chat room

ENGINE_BASIC_QUALITY_MODE

SCENE_DEFAULT_MODE

Good audio quality. Prioritizes call quality and smooth transmission. Suitable for scenarios that do not require the highest audio quality.

Small-group voice-based class

ENGINE_HIGH_QUALITY_MODE

SCENE_DEFAULT_MODE

High-definition audio quality. Prioritizes call quality and smooth transmission. Suitable for scenarios that require the highest voice quality.

Small-group musical instrument class

ENGINE_HIGH_QUALITY_MODE

SCENE_MUSIC_MODE

High-definition audio quality. Prioritizes music quality and smooth transmission. Suitable for scenarios that require the highest music quality.

Co-streaming (chit-chat)

ENGINE_HIGH_QUALITY_MODE

SCENE_MEDIA_MODE

Smooth transmission and high-definition audio. Ensures voice quality while also considering music quality. Suitable for chat scenarios with both voice and music.

Co-streaming (singing)

ENGINE_HIGH_QUALITY_MODE

SCENE_MUSIC_MODE

Smooth transmission and high-definition audio. Prioritizes music quality and works with various sound effects. Suitable for scenarios that primarily involve singing or playing musical instruments.

Small wearable devices (such as smartwatches)

ENGINE_LOW_QUALITY_MODE

SCENE_DEFAULT_MODE

Smooth transmission and good audio quality. Prioritizes clear and understandable voice with low power consumption.

Implementation

JsonObject jsonObject = new JsonObject();
// Enable high quality mode in a music scenario.
jsonObject.put("user_specified_engine_mode","ENGINE_HIGH_QUALITY_MODE");
jsonObject.put("user_specified_scene_mode","SCENE_MUSIC_MODE");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

Process video using a third-party retouching SDK

Feature description

  • Before integration, add the `user_specified_video_preprocess: TRUE` parameter to the `extras` field of the software development kit (SDK) instance.

  • A common issue after integration is that the local user can see the retouching effect, but the remote user cannot. This issue occurs because this parameter is not set.

Implementation

JsonObject jsonObject = new JsonObject();
jsonObject.put("user_specified_video_preprocess","TRUE");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

One-to-one mode

In one-to-one mode, stream ingest is automatic. Only the primary camera stream is ingested, not the secondary camera stream.

Scenario description

Real-time communication is used in a wide range of applications, including various online education scenarios. One-to-one instruction is a common use case in education. Typical one-to-one scenarios include online tutoring, language teaching, music practice sessions, and online interviews.

Implementation

JsonObject jsonObject = new JsonObject();
jsonObject.put("user_specified_groupid","1v1");

AliRtcEngine engine= AliRtcEngine.getInstance(context, jsonObject.toString());

Information collection on Android

Scenario description

To improve the real-time communication experience, the Real-Time Communication SDK collects Wi-Fi RSSI, monitors the incoming call status, and gathers CPU core count information by default. To meet compliance requirements, developers can disable this data collection using the following parameters.

  • no_wifi_rssi_data

To retrieve the Wi-Fi signal strength, the `android.net.wifi.WifiInfo.getRssi` method is called.

  • no_phone_state_listen_data

To monitor the incoming call status, the `android.telephony.TelephonyManager.listen` method is called.

  • no_cpu_number_data

To retrieve the number of CPU cores, the `java.lang.Runtime.getRuntime` method is called.

In addition, to facilitate optimal network routing and ensure device compatibility, the SDK for Android collects the device model, IP address, carrier, network type, and Wi-Fi SSID. The collection of these items is mandatory.