All Products
Search
Document Center

Intelligent Media Services:Known issues and solutions

Last Updated:Jun 16, 2025

This topic outlines the problems you may encounter when integrating ApsaraVideo Real-time Communication (ARTC) SDK beta version, including known issues with the SDK and HarmonyOS NEXT operating system. It also provides the corresponding solutions. We recommend that you read this topic thoroughly before integration. If you have any questions, submit a ticket for technical support.

ArkTS issues

  1. Crash caused by using a map to create an object

    // SDK interface
    public playAudioEffect(soundId: number, filePath: string, config: AliRtcAudioEffectConfig): numbe
    
    // Use a map to create an object in ArkTS.
    // The map cannot be directly matched to the expected C++ object, which may cause a crash.
    this.rtcSdk?.playAudioEffect(1, "test", {
                needPublish: true,
                loopCycles: 0,
                startPosMs: 0,
                publishVolume: 0,
                playoutVolume: 0
              } );
    
    // Recommended method
    let config = new AliRtcAudioEffectConfig();
    config.needPublish = 0;
    config.loopCycles = 0;
    config.startPosMs = 0;
    config.publishVolume = 0;
    config.playoutVolume = 0;
    this.rtcSdk?.playAudioEffect(1, "test", config);
  2. Invalid data type

    You must pass the correct data type defined by the SDK. For example, the value of the loopCycles parameter in AliRtcAudioEffectConfig must be of NUMBER type. Passing a string can lead to a conversion error and disrupt the business logic.

Audio issues

  1. Users cannot switch between the speaker and earpiece during a call.

    HarmonyOS NEXT does not provide an API that allows users to manually switch between the speaker and earpiece.

  2. When a user repeatedly enters and leaves a call, audio playback failures occasionally occur.

    This is an issue with HarmonyOS NEXT. Restart the phone to resolve the issue.

  3. Using a Type-C to 3.5 mm adapter with three-ring headphones triggers audio disorder in meeting scenarios.

    This is an issue with HarmonyOS NEXT. Restart the phone to resolve the issue. We recommend not using a Type-C to 3.5 mm adapter with headphones.

Video issues

When an application returns to the foreground, the preview screen flickers.

HarmonyOS NEXT restricts camera usage for applications in the background. When an application returns to the foreground, the camera must be restarted, causing the preview screen to flicker.

Performance issues

  1. Application Not Responding (ANR) errors occur occasionally when engines are repeatedly created and destroyed.

    The upper layer of HarmonyOS NEXT uses TypeScript (TS) engines that operate on a single thread. If you call native APIs within callback methods, ANR errors may occur. We are solving this issue with Huawei. We recommend that you avoid calling RTC APIs within callback methods and implement protection mechanisms at the platform layer to handle quick transitions.

  2. Event callbacks are not as timely as on Android and iOS platforms.

    The native callbacks to the platform layer are routed through the main thread. Each callback must wait for the previous one to complete before it can be executed, which causes delay. We are working on this issue with Huawei. We recommend that you reduce registered listeners and implement callbacks only when necessary.

Data callback issues

Callbacks for raw data, including recorded video and audio data, are unavailable.

The callbacks to the platform layer are routed through the main thread. Processing recorded video and audio data on the main thread can cause thread blocking, triggering ANR errors. Therefore, we currently do not provide relevant APIs.