This topic describes the methods of the AliEngine class provided by Real-Time Communication (RTC) SDK for Windows.

Description

For more information about the details of the methods of the AliEngine class, see AliEngine.

List of methods

Basic methods

Method Description Supported minimum version
SetH5CompatibleMode Specifies whether to enable the HTML5 compatibility mode. 1.1
GetH5CompatibleMode Queries whether the HTML5 compatibility mode is enabled. 1.1
Create Creates an AliEngine instance. 2.1
Destroy Destroys an AliEngine instance. 1.1
UploadLog Uploads logs. 1.15
SetLogDirPath Sets the path for storing the log files of the SDK. 1.16.2
SetEngineEventListener Configures a callback. 2.1
QueryInterface Queries a class instance. 2.1

Channel-related methods

Method Description Supported minimum version
JoinChannel Joins a channel. 1.1
LeaveChannel Leaves a channel. 1.1
SwitchChannel Switches to another channel. 2.1
IsInCall Checks whether you are in a channel. 1.1
SetChannelProfile Sets the channel mode. 1.15
CreateChannel Creates a subchannel. 2.1
DestroyChannel Destroys the subchannel that is created by the calling the CreateChannel method. 2.1

Stream ingest-related methods

Method Description Supported minimum version
PublishLocalVideoStream Specifies whether to enable stream ingest for a video track. 2.1
IsLocalVideoStreamPublished Queries whether stream ingest is enabled for a video track. 1.1
IsScreenSharePublished Queries whether stream ingest is enabled for a screen track. 1.1
PublishLocalAudioStream Specifies whether to enable stream ingest for an audio track. 2.1
IsLocalAudioStreamPublished Queries whether stream ingest is enabled for an audio track. 1.1
PublishLocalDualStream Specifies whether to enable stream ingest for the minor stream of a video track. 2.1
IsDualStreamPublished Queries whether stream ingest is enabled for the minor stream of a video track. 2.1

Stream pulling-related methods

Method Description Supported minimum version
SetRemoteVideoStreamType Specifies the type of the stream to be pulled for a camera track. 2.1
SetRemoteDefaultVideoStreamType Specifies the type of the stream to be pulled by default for a camera track. 2.1
SetDefaultSubscribeAllRemoteAudioStreams Specifies whether to pull a stream for an audio track by default. 2.1
SubscribeAllRemoteAudioStreams Pulls or stops pulling streams for the audio tracks of all remote users. 2.1
SubscribeRemoteAudioStream Pulls or stops pulling a stream for the audio track of a specific remote user. 2.1
SetDefaultSubscribeAllRemoteVideoStreams Specifies whether to pull a stream for a video track by default. 2.1
SubscribeAllRemoteVideoStreams Pulls or stops pulling streams for the video tracks of all remote users. 2.1
SubscribeRemoteVideoStream Pulls or stops pulling a stream for the video track of a specific remote user. 2.1

Video-related methods

Method Description Supported minimum version
SetScreenShareEncoderConfiguration Sets the encoding properties for screen sharing. 2.1
SetLocalViewConfig Sets the rendering view and drawing parameters for local preview. 1.1
SetCameraCapturerConfiguration Sets the collection preference of a camera. 2.1
SetDeviceOrientationMode Sets the display orientation of a device. This method applies to Android or iOS. 2.1
EnableLocalVideo Specifies whether to disable or re-enable local video collection. 2.1
MuteLocalCamera Specifies whether to stop ingesting a stream for a local video track. 1.1
MuteAllRemoteVideo Renders or stops rendering the video tracks of all remote users. 2.1
SetRemoteViewConfig Sets the rendering view and drawing parameters for the video track of a remote user. 1.1
UpdateViewConfig Updates the rendering configuration. 2.1
IsCameraOn Queries whether the camera is enabled. 1.1
StopRecord Stops recording. 1.17
StartRecord Starts recording in non-layout mode. 1.17
StartRecord Starts recording based on the system layout. 2.1
UpdateRecordLayout Updates the recording information. 2.1
AddRecordTemplate Creates a recording template. 2.1
PauseRecord Pauses recording. 2.1
ResumeRecord Resumes recording. 2.1
SetBeautyEffect Specifies whether to enable basic retouching. 1.17.9
SetVideoEncoderConfiguration Sets video encoding properties. 2.1
AddVideoWatermark Adds a watermark. 2.1
ClearVideoWatermark Removes the watermark information from a video track. 2.1
SnapshotVideo Captures a snapshot. 2.1
SwitchCamera Switches between the front and rear cameras. This method applies to Android or iOS. 2.1
GetCurrentCameraDirection Queries the current camera type. This method applies to Android or iOS. 2.1
SetCameraZoom Sets the zoom factor of the camera. This method applies to Android or iOS. 2.1
SetCameraFlash Specifies whether to enable the camera flash. This method applies to Android or iOS. 2.1
IsCameraFocusPointSupported Queries whether the camera supports manual focus. This method applies to Android or iOS. 2.1
IsCameraExposurePointSupported Queries whether an exposure point can be set for the camera. This method applies to Android or iOS. 2.1
SetCameraFocusPoint Sets the manual focus point of the camera. This method applies to Android or iOS. 2.1
SetCameraExposurePoint Sets the exposure point of the camera. This method applies to Android or iOS. 2.1
IsCameraAutoFocusFaceModeSupported Queries whether the camera supports face focus. This method applies to Android or iOS. 2.1
SetCameraAutoFocusFaceModeEnabled Specifies whether to enable face focus for the camera. This method applies to Android or iOS. 2.1
GetIfUserFetchObserverData Specifies whether a user obtains the video output data. 2.4
GetVideoAlignment Queries the width alignment of the output video. 2.4
GetObserverDataMirrorApplied Queries whether the video output data requires mirroring. 2.4
GetSmoothRenderingEnabled Queries whether the generated stream pulling data for a video track is smoothed. 2.4
GetVideoCaptureData Proactively obtains the collected data. 2.4
GetVideoPreEncoderData Proactively obtains the raw data. 2.4
GetVideoRenderData Proactively obtains the stream pulling data. 2.4

Methods related to screen sharing

Method Description Supported minimum version
StartScreenShareByDesktopId Performs screen sharing based on the desktop ID. 2.1
StartScreenShareByScreenRegion Performs screen sharing based on the screen area. 2.1
StartScreenShareByWindowId Performs screen sharing based on the window ID. 2.1
StartScreenShare Starts screen sharing. This method applies to Android or iOS. 2.1
StopScreenShare Stops screen sharing. 2.1
UpdateScreenShareConfig Updates the screen sharing configuration. 2.1
GetScreenShareConfig Queries the screen sharing configuration. 2.1
GetScreenShareSourceInfo Queries the information about screen sharing sources. 2.1
GetCurrentScreenShareSourceId Queries the ID of the current screen sharing source. 2.1
GetCurrentScreenShareSourceType Queries the type of the current screen sharing source. 2.1
GetDesktopRegion Queries the screen sharing area on the desktop. 2.1

Audio-related methods

Method Description Supported minimum version
SetAudioOnlyMode Enables the audio-only mode or the audio-video mode. 1.1
IsAudioOnlyMode Queries whether the audio-only mode is enabled. 1.1
MuteLocalMic Specifies whether to mute the local audio. 1.1
MuteRemoteAudio Specifies whether to stop the playback of the audio track of a specific remote user. 1.1
MuteAllRemoteAudio Specifies whether to stop the playback of the audio tracks of all remote users. 1.16.2
StartAudioCapture Starts audio collection. 1.11
StartAudioCapture Starts audio collection. You can call this method to start audio collection in advance. If you do not call the method, the SDK starts audio collection at an appropriate point in time. 2.2
StopAudioCapture Stops audio collection. 1.11
StartAudioPlayer Starts the audio player. 1.11
StopAudioPlayer Stops the audio player. 1.11
SetRemoteAudioVolume Sets the local playback volume for the audio track of a specific remote user. 2.1
SetDefaultAudioRouteToSpeakerphone Sets the headset or speaker as the default audio output device. This method applies to Android or iOS. 2.1
EnableSpeakerphone Sets the headset or speaker as the audio output device. This method applies to Android or iOS. 2.1
IsEnableSpeakerphone Queries whether the current audio output device is the headset or the speaker. This method applies to Android or iOS. 2.1
SetRecordingVolume Sets the recording volume. 1.16.2
SetPlayoutVolume Sets the playback volume. 1.16.2
EnableAudioVolumeIndication Sets the volume callback interval and smoothing factor. By default, the indicators for indicating the volume and the person who speaks are disabled. 1.17.9
SetAudioProfile Sets the audio profile. 2.1
SetDeviceVolumeType Sets the volume type. This method applies to iOS. 2.1
EnableAudioDTX Enables the local audio detection feature for throttling. 2.1
EnableAudioAMD Enables the microphone audio detection feature for throttling. 2.1
SetAudioEffectVoiceChangerMode Sets the voice change mode. 2.1
SetAudioEffectPitchValue Sets the audio pitch. 2.1
SetAudioEffectReverbMode Sets the sound effect mode. 2.1
SetAudioEffectReverbParamType Sets the sound effect parameters. 2.1
StartAudioAccompany Starts audio mixing. This method applies to Android or iOS. 2.1
StopAudioAccompany Stops audio mixing. This method applies to Android or iOS. 2.1
SetAudioAccompanyVolume Sets the volume of the mixed audio. This method applies to Android or iOS. 2.1
SetAudioAccompanyPublishVolume Sets the volume of the mixed audio for stream ingest. This method applies to Android or iOS. 2.1
GetAudioAccompanyPublishVolume Queries the volume of the mixed audio for stream ingest. This method applies to Android or iOS. 2.1
SetAudioAccompanyPlayoutVolume Sets the volume of the mixed audio for local playback. This method applies to Android or iOS. 2.1
GetAudioAccompanyPlayoutVolume Queries the volume of the mixed audio for local playback. This method applies to Android or iOS. 2.1
PauseAudioAccompany Pauses audio mixing. This method applies to Android or iOS. 2.1
ResumeAudioAccompany Resumes audio mixing. This method applies to Android or iOS. 2.1
GetAudioAccompanyDuration Queries the duration of a music file. This method applies to Android or iOS. 2.1
GetAudioAccompanyCurrentPosition Queries the playback progress of a music file. This method applies to Android or iOS. 2.1
SetAudioAccompanyPosition Sets the playback position of a music file. This method applies to Android or iOS. 2.1
PreloadAudioEffect Preloads a sound effect. This method applies to Android or iOS. 2.1
UnloadAudioEffect Deletes a preloaded sound effect. This method applies to Android or iOS. 2.1
PlayAudioEffect Starts the playback of a sound effect. This method applies to Android or iOS. 2.1
StopAudioEffect Stops the playback of a sound effect. This method applies to Android or iOS. 2.1
StopAllAudioEffects Stops the playback of all sound effects. This method applies to Android or iOS. 2.1
SetAudioEffectPublishVolume Sets the volume of a sound effect for stream ingest. This method applies to Android or iOS. 2.1
GetAudioEffectPublishVolume Queries the volume of a sound effect for stream ingest. This method applies to Android or iOS. 2.1
SetAudioEffectPlayoutVolume Sets the volume of a sound effect for local playback. This method applies to Android or iOS. 2.1
GetAudioEffectPlayoutVolume Queries the volume of a sound effect for local playback. This method applies to Android or iOS. 2.1
SetAllAudioEffectsPublishVolume Sets the volume of all sound effects for local playback. This method applies to Android or iOS. 2.1
SetAllAudioEffectsPlayoutVolume Sets the volume of all sound effects for stream ingest. This method applies to Android or iOS. 2.1
PauseAudioEffect Pauses the playback of a sound effect. This method applies to Android or iOS. 2.1
PauseAllAudioEffects Pauses the playback of all sound effects. This method applies to Android or iOS. 2.1
ResumeAudioEffect Resumes the playback of a sound effect. This method applies to Android or iOS. 2.1
ResumeAllAudioEffects Resumes the playback of all sound effects. This method applies to Android or iOS. 2.1
EnableEarBack Enables in-ear monitoring. This method applies to Android or iOS. 2.1
SetEarBackVolume Sets the headset volume when in-ear monitoring is enabled. This method applies to Android or iOS. 2.1
EnableSystemAudioRecording Specifies whether to enable system audio collection and pushing. 2.1
IsSystemAudioRecording Queries whether system audio collection and pushing are enabled. 2.1
SetSystemAudioRecordingVolume Sets the volume of system audio that is collected and pushed. 2.1
GetSystemAudioRecordingVolume Queries the current volume of system audio that is collected and pushed. 2.1
SetRecordingDeviceMute Specifies whether to mute an audio collection device. 2.4
GetRecordingDeviceMute Queries whether an audio collection device is muted. 2.4
SetPlaybackDeviceMute Specifies whether to mute an audio player. 2.4
GetPlaybackDeviceMute Queries whether an audio player is muted. 2.4

Methods related to relayed live streaming

Method Description Supported minimum version
StartPublishLiveStream Starts relayed live streaming. 2.4
UpdatePublishLiveStream Updates the parameters for relayed live streaming. 2.4
StopPublishLiveStream Stops relayed live streaming. 2.1
UpdateLiveStreamingViewConfig Updates the rendering view and rendering parameters for stream pulling. 2.1
GetPublishLiveStreamState Queries the status of relayed live streaming. 2.4

Methods related to co-streaming across channels

Method Description Supported minimum version
StartChannelRelay Starts co-streaming across channels. 2.1
UpdateChannelRelay Updates the configuration for co-streaming across channels. 2.1
StopChannelRelay Stops co-streaming across channels. 2.1
EnableBackgroundExchange Enables or disables the background replacement feature. 2.4
EnableBackgroundBlur Enables or disables the background blur feature. 2.4

Preview-related methods

Method Description Supported minimum version
StartPreview Starts a local preview. 1.1
StopPreview Stops a local preview. 1.1

Methods for querying remote users

Method Description Supported minimum version
GetOnlineRemoteUsers Queries online remote users. 1.1
GetUserInfo Queries the information about a remote user. 1.1
IsUserOnline Queries whether a user is online. 1.1

Other methods

Method Description Supported minimum version
SetLogLevel Sets the log level. 1.1
GetSDKVersion Queries the version number of the SDK. 1.1
GetErrorDescription Queries an error code. 2.1
GetEncodeParam Queries the encoding resolution. 2.1
SetClientRole Specifies the role of a user. 1.16
GetClientRole Queries the role of a user. 1.17.19
StartLastmileDetect Starts network quality monitoring. 1.16.2
StopLastmileDetect Stops network quality monitoring. 1.16.2
PostFeedback Gives feedback on an SDK issue. 1.17.12
SendMediaExtensionMsg Sends extended media information. 1.17.1
StartIntelligentDenoise Enables intelligent noise reduction. 1.17.19
StopIntelligentDenoise Disables intelligent noise reduction. 1.17.19
RefreshAuthInfo Refreshes the authentication information. 1.17.41
SetAudioSessionOperationRestriction Specifies the control permission of the SDK on AVAudioSession. This method applies to iOS. 2.1
GetCurrentConnectionStatus Queries the current status of network connection. 2.1
ShowDebugView Displays the user debugging data. 2.4

Details of methods

  • SetH5CompatibleMode: specifies whether to enable the HTML5 compatibility mode.
    static void SetH5CompatibleMode(bool comp);
    Parameter description
    Parameter Type Description
    comp bool Specifies whether to enable the HTML5 compatibility mode. Valid values:
    • true: enables the HTML5 compatibility mode.
    • false: disables the HTML5 compatibility mode. This is the default value.
    Important You cannot modify the HTML5 compatibility settings for the current version after you create an AliEngine instance. You must call this method before you create an AliEngine instance.
  • GetH5CompatibleMode: queries whether the HTML5 compatibility mode is enabled.
    static bool GetH5CompatibleMode();
    Return value description

    A value of true indicates that the HTML5 compatibility mode is enabled. A value of false indicates that the HTML5 compatibility mode is disabled.

  • Create: creates an AliEngine instance.
    static AliEngine *Create(const char *extras);
    Parameter description
    Parameter Type Description
    extras const char * Uses a JSON string to configure a special SDK feature. For more information, see extras parameters.
    Important You can create only one primary instance.
  • Destroy: destroys an AliEngine instance.
    static AliEngine::Destroy();
    Important Call this method after all operations are complete.
  • UploadLog: uploads logs. By default, logs are automatically uploaded.
    static void UploadLog();
  • setLogDirPath: sets the path for storing the log files of the SDK.
    static int SetLogDirPath(const char *logDirPath);
    Parameter description
    Parameter Type Description
    logDirPath const char * The absolute path for storing the log files of the SDK. By default, the log files are stored in the %appdata% directory.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Important We recommend that you call this method before you call other methods to avoid log loss. Before you call this method, make sure that the specified path exists and log files can be written to the path.
  • SetEngineEventListener: configures a callback.
    int SetEngineEventListener(AliEngineEventListener *listener);
    Parameter description
    Parameter Type Description
    listener AliEngineEventListener * The pointer to the callback class.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • QueryInterface: queries a class instance.
    int QueryInterface(AliEngineInterfaceIdType iid, void** pInterface);
    Parameter description
    Parameter Type Description
    iid AliEngineInterfaceIdType The type of the class.
    pInterface void** A secondary pointer to a device management class or media engine class.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • JoinChannel: joins a channel.
    int JoinChannel(const AliEngineAuthInfo &authInfo,const char *userName);
    Parameter description
    Parameter Type Description
    authInfo const AliEngineAuthInfo & The authentication information.
    userName const char * The display name instead of the ID of the user.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note
    • If you want to join another channel from your existing channel, you must call the LeaveChannel method to leave the existing channel. If you want to retry after you fail to join a channel, you do not need to call the LeaveChannel method.
    • The JoinChannel method is an asynchronous method. You can invoke the OnJoinChannelResult callback to know whether you have successfully joined a channel.
  • LeaveChannel: leaves a channel.
    int LeaveChannel();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note
    • For V1.15 and later, you must call the Destroy method to destroy an AliEngine instance.
    • For versions earlier than V1.15, the AliEngine instance is automatically destroyed after you leave a channel. To join a channel after you leave a channel, you must call the Create method to initialize an AliEngine instance again.
    • If you call the LeaveChannel method when you are not in a channel, the AliEngine instance is not affected. However, a message is generated to notify other users in the channel.
  • SwitchChannel: switches to another channel.
    int SwitchChannel(const AliEngineAuthInfo &authInfo);
    Parameter description
    Parameter Type Description
    authInfo const AliEngineAuthInfo & The authentication information.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    • If AliEngineErrorInvaildState is returned, check whether the channel mode or role matches or whether you are in a channel.
    • If AliEngineErrorInvaildArgument is returned, check whether the authentication information is valid or whether you have already joined the channel.
    • If AliEngineErrorInner is returned, the SDK is in an abnormal state.
    Note
    • This method can be called only by users of the AliEngineClientRoleLive role in AliEngineInteractiveLive mode.
    • The SwitchChannel method is an asynchronous method. After you switch to another channel by calling this method, the SDK first triggers the OnLeaveChannelResult callback for leaving the previous channel and then the OnJoinChannelResult callback for joining a new channel.
  • IsInCall: checks whether you are in a channel.
    bool IsInCall();
    Return value description

    A value of true indicates that you are in a channel. A value of false indicates that you are not in a channel.

  • SetChannelProfile: sets the channel mode.
    int SetChannelProfile(const AliEngineChannelProfile channelProfile);
    Parameter description
    Parameter Type Description
    channelProfile AliEngineChannelProfile The channel mode. Default value: AliEngineCommunication.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note You can call this method only before you join a channel. You cannot change the mode of a channel when you are in the channel. However, you can change the mode of a channel after you leave the channel.
  • CreateChannel: creates a subchannel.
    AliEngine * CreateChannel(const char* extras);
    Parameter description
    Parameter Type Description
    extras const char* Specifies the additional parameters delivered in canary releases.
    Return value description

    If the call is successful, the created subchannel is returned. If the call failed, a null pointer is returned.

  • DestroyChannel: destroys the subchannel that is created by the calling the CreateChannel method.
    void DestroyChannel();
  • PublishLocalVideoStream: specifies whether to enable stream ingest for a video track.
    int PublishLocalVideoStream(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable stream ingest for a video track. Valid values:
    • true: enables stream ingest for the video track. This is the default value.
    • false: disables stream ingest for the video track.
  • IsLocalVideoStreamPublished: queries whether stream ingest is enabled for a video track.
    bool IsLocalVideoStreamPublished();
    Return value description

    A value of true indicates that stream ingest is enabled for the video track. A value of false indicates that stream ingest is disabled for the video track.

  • IsScreenSharePublished: queries whether stream ingest is enabled for a screen track.
    bool IsScreenSharePublished();
    Return value description

    A value of true indicates that stream ingest is enabled for the screen track. A value of false indicates that stream ingest is disabled for the screen track.

  • PublishLocalAudioStream: specifies whether to enable stream ingest for an audio track.
    int PublishLocalAudioStream(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable stream ingest for an audio track. Valid values:
    • true: enables stream ingest for the audio track. This is the default value.
    • false: disables stream ingest for the audio track.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsLocalAudioStreamPublished: queries whether stream ingest is enabled for an audio track.
    bool IsLocalAudioStreamPublished();
    Return value description

    A value of true indicates that stream ingest is enabled for the audio track. A value of false indicates that stream ingest is disabled for the audio track.

  • PublishLocalDualStream: specifies whether to enable stream ingest for the minor stream of a video track.
    int PublishLocalDualStream(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable stream ingest for the minor stream of a video track. Valid values:
    • true: enables stream ingest for the minor stream of the video track. This is the default value.
    • false: disables stream ingest for the minor stream of the video track.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsDualStreamPublished: queries whether stream ingest is enabled for the minor stream of a video track.
    bool IsDualStreamPublished();
    Return value description

    A value of true indicates that stream ingest is enabled for the minor stream of the video track. A value of false indicates that stream ingest is disabled for the minor stream of the video track.

  • SetRemoteVideoStreamType: specifies the type of the stream to be pulled for a camera track.
    int SetRemoteVideoStreamType(const char* uid,AliEngineVideoStreamType streamType);
    Parameter description
    Parameter Type Description
    uid const char* The ID of the remote user.
    streamType AliEngineVideoStreamType The type of the stream for the camera track. The default value is AliEngineVideoStreamTypeHigh, which indicates a major stream.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetRemoteDefaultVideoStreamType: specifies the type of the stream to be pulled by default for a camera track.
    int SetRemoteDefaultVideoStreamType(AliEngineVideoStreamType streamType);
    Parameter description
    Parameter Type Description
    streamType AliEngineVideoStreamType The type of the stream for the camera track. The default value is AliEngineVideoStreamTypeHigh, which indicates a major stream.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetDefaultSubscribeAllRemoteAudioStreams: specifies whether to pull a stream for an audio track by default.
    int SetDefaultSubscribeAllRemoteAudioStreams(bool sub);
    Parameter description
    Parameter Type Description
    sub bool Specifies whether to pull a stream for an audio track by default. Valid values:
    • true: pulls a stream for an audio track by default. This is the default value.
    • false: stops pulling a stream for an audio track by default.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SubscribeAllRemoteAudioStreams: pulls or stops pulling streams for the audio tracks of all remote users.
    int SubscribeAllRemoteAudioStreams(bool sub);
    Parameter description
    Parameter Type Description
    sub bool Specifies whether to pull streams for the audio tracks of all remote users. Valid values:
    • true: pulls streams for the audio tracks of all remote users. This is the default value.
    • false: stops pulling streams for the audio tracks of all remote users
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SubscribeRemoteAudioStream: pulls or stops pulling a stream for the audio track of a specific remote user.
    int SubscribeRemoteAudioStream(const char* uid, bool sub);
    Parameter description
    Parameter Type Description
    uid const char* The ID of the remote user.
    sub bool Specifies whether to pull a stream for the audio track of a specific remote user. Valid values:
    • true: pulls a stream for the audio track of a specific remote user. This is the default value.
    • false: stops pulling a stream for the audio track of a specific remote user.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetDefaultSubscribeAllRemoteVideoStreams: specifies whether to pull a stream for a video track by default.
    int SetDefaultSubscribeAllRemoteVideoStreams(bool sub);
    Parameter description
    Parameter Type Description
    sub bool Specifies whether to pull a stream for a video track by default. Valid values:
    • true: pulls a stream for a video track by default. This is the default value.
    • false: stops pulling a stream for a video track by default.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SubscribeAllRemoteVideoStreams: pulls or stops pulling streams for the video tracks of all remote users.
    int SubscribeAllRemoteVideoStreams(bool sub);
    Parameter description
    Parameter Type Description
    sub bool Specifies whether to pull streams for the video tracks of all remote users. Valid values:
    • true: pulls streams for the video tracks of all remote users. This is the default value.
    • false: stops pulling streams for the video tracks of all remote users.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SubscribeRemoteVideoStream: pulls or stops pulling a stream for the video track of a specific remote user.
    int SubscribeRemoteVideoStream(const char* uid, AliEngineVideoTrack track, bool sub);
    Parameter description
    Parameter Type Description
    uid const char* The ID of the remote user.
    track AliEngineVideoTrack The type of the video track.
    sub bool Specifies whether to pull a stream for the video track of a specific remote user. Valid values:
    • true: pulls a stream for the video track of a specific remote user. This is the default value.
    • false: stops pulling a stream for the video track of a specific remote user.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetScreenShareEncoderConfiguration: sets the encoding properties for screen sharing.
    void SetScreenShareEncoderConfiguration(const AliEngineScreenShareEncoderConfiguration& config);
    Parameter description
    Parameter Type Description
    config const AliEngineScreenShareEncoderConfiguration & The encoding properties for screen sharing. Default values of the encoding properties:
    • dimensions: (0,0)
    • frameRate: AliEngineFrameRateFps5
    • bitrate: 512
    • rotationMode: AliEngineRotationMode_0
  • SetLocalViewConfig: sets the rendering view and drawing parameters for local preview.
    int SetLocalViewConfig(AliEngineVideoCanvas renderConfig,AliEngineVideoTrack track);
    Parameter description
    Parameter Type Description
    renderConfig AliEngineVideoCanvas The rendering configuration, including the rendering view and rendering mode.
    track AliEngineVideoTrack The type of the video track.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note
    • You can switch a view before and after you join a channel. If you set the displayView parameter of the AliEngineVideoCanvas class to NULL, rendering is stopped.
    • If you need to reset the rendering mode during playback, change only the value of the renderMode parameter, but not the values of other parameters in the AliEngineVideoCanvas class.
    • The default rendering mode in AliEngineVideoCanvas is AliEngineRenderModeAuto.
  • SetCameraCapturerConfiguration: sets the collection preference of the camera.
    int SetCameraCapturerConfiguration(const AliEngineCameraCapturerConfiguration& config);
    Parameter description
    Parameter Type Description
    config const AliEngineCameraCapturerConfiguration & The collection preference of the camera. Default value: AliEngineCaptureOutputPreferenceAuto.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetDeviceOrientationMode: sets the display orientation of a device. This method applies to Android or iOS.
    int SetDeviceOrientationMode(AliEngineOrientationMode mode);
    Parameter description
    Parameter Type Description
    mode AliEngineOrientationMode The display orientation of the device. Default value: AliEngineOrientationModePortrait, which indicates the portrait mode.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableLocalVideo: disables or re-enables local video collection.
    int EnableLocalVideo(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to disable or re-enable local video collection. Valid values:
    • true: re-enables local video collection. This is the default value.
    • false: disables local video collection.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • MuteLocalCamera: specifies whether to stop ingesting the stream for a local video track.
    int MuteLocalCamera(bool mute, AliEngineVideoTrack track);
    Parameter description
    Parameter Type Description
    mute bool Specifies whether to ingest or stop ingesting the stream for a local video track. Valid values:
    • true: stops ingesting the stream for a local video track.
    • false: ingests the stream for a local video track. This is the default value.
    track AliEngineVideoTrack The type of the video track whose stream ingest status needs to be changed.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note You can call this method to control whether to send a black frame for a specific video track. This does not affect the video collection and sending processes. If you need to disable the video collection process, call the EnableLocalVideo method. If you need to disable the video sending process, call the PublishLocalVideoStream method.
  • MuteAllRemoteVideo: renders or stops rendering the video tracks of all remote users.
    int MuteAllRemoteVideo(bool mute);
    Parameter description
    Parameter Type Description
    mute bool Specifies whether to render or stop rendering the video tracks of all remote users. Valid values:
    • true: stops rendering the video tracks of all remote users by sending black frames.
    • false: renders the video tracks of all remote users. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetRemoteViewConfig: sets the rendering view and drawing parameters for the video track of a remote user.
    int SetRemoteViewConfig(AliEngineVideoCanvas renderConfig,const char *uid,AliEngineVideoTrack track);
    Parameter description
    Parameter Type Description
    renderConfig AliEngineVideoCanvas The rendering configuration, including the rendering view and rendering mode.
    uid const char * The ID of the remote user.
    track AliEngineVideoTrack The type of the video track.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UpdateViewConfig: updates the rendering configuration.
    int UpdateViewConfig(AliEngineVideoCanvas renderConfig);
    Parameter description
    Parameter Type Description
    renderConfig AliEngineVideoCanvas The rendering configuration, including the rendering view and rendering mode.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • isCameraOn: queries whether the camera is enabled.
    bool IsCameraOn();
    Return value description

    A value of true indicates that the camera is enabled. A value of false indicates that the camera is disabled.

  • StopRecord: stops recording.
    bool StopRecord();
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • StartRecord: starts recording in non-layout mode.
    bool StartRecord(AliEngineRecordType recordType, AliEngineRecordFormat recordFormat, const char * filePath, AliEngineRecordAudioConfig& audioConfig, AliEngineRecordVideoConfig& videoConfig, bool isFragment);
    Parameter description
    Parameter Type Description
    recordType AliEngineRecordType The recording type.
    recordFormat AliEngineRecordFormat The recording format.
    filePath const char * The file path.
    audioConfig AliEngineRecordAudioConfig & The settings for audio recording.
    videoConfig AliEngineRecordVideoConfig & The settings for video recording.
    isFragment bool Specifies whether to allow clip recording for MP4 videos. This parameter is valid only for MP4 video recording.
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • StartRecord: starts recording based on the system layout.
    int StartRecord(const char* filePath, const AliEngineRecordVideoLayout& layout);
    Parameter description
    Parameter Type Description
    filePath const char * The file path.
    layout const AliEngineRecordVideoLayout & The layout settings for video recording.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UpdateRecordLayout: updates the recording information.
    bool UpdateRecordLayout(AliEngineRecordVideoLayout& layout);
    Parameter description
    Parameter Type Description
    layout AliEngineRecordVideoLayout & Specifies the content and layout of the video recording.
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • AddRecordTemplate: creates a recording template.
    int AddRecordTemplate(const AliEngineRecordTemplate& rTemplate);
    Parameter description
    Parameter Type Description
    rTemplate const AliEngineRecordTemplate & The recording template.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • PauseRecord: pauses recording.
    bool PauseRecord();
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • ResumeRecord: resumes recording.
    bool ResumeRecord();
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • SetBeautyEffect: specifies whether to enable basic retouching.
    int SetBeautyEffect(bool enable, const AliEngineBeautyConfig &config);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable basic retouching. Valid values:
    • true: enables basic retouching.
    • false: disables basic retouching. This is the default value.
    config const AliEngineBeautyConfig & The basic retouching configuration.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note This method supports only skin whitening and skin smoothing.
  • SetVideoEncoderConfiguration: sets video encoding properties.
    void SetVideoEncoderConfiguration(const AliEngineVideoEncoderConfiguration& config);
    Parameter description
    Parameter Type Description
    config const AliEngineVideoEncoderConfiguration & The predefined encoding properties. Default values of the encoding properties:
    • dimensions: (640, 480)
    • frameRate: AliEngineFrameRateFps15
    • bitrate: 512
    • orientationMode: AliEngineVideoEncoderOrientationModeAdaptive
    • mirrorMode: AliEngineVideoMirrorModeDisabled
    • rotationMode: AliEngineRotationMode_0
  • AddVideoWatermark: adds a watermark.
    int AddVideoWatermark(AliEngineVideoTrack track, const char* imageUrl, const AliEngineWaterMarkConfig &options);
    Parameter description
    Parameter Type Description
    track AliEngineVideoTrack The type of the video track.
    imageUrl const char* The URL of the watermark image.
    options const AliEngineWaterMarkConfig & The watermark configuration.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • ClearVideoWatermark: removes the watermark information from a video track.
    int ClearVideoWatermark(AliEngineVideoTrack track);
    Parameter description
    Parameter Type Description
    track AliEngineVideoTrack The type of the video track.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SnapshotVideo: captures a snapshot.
    int SnapshotVideo(const String& userId, const AliEngineVideoTrack &trackType);
    Parameter description
    Parameter Type Description
    userId const String & The ID of the user. An empty value for this parameter indicates the local user.
    trackType const AliEngineVideoTrack & The type of the video track.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note You can invoke the OnSnapshotComplete callback to obtain the snapshot result.
  • SwitchCamera: switches between the front and rear cameras. By default, the front camera is used. This method applies to Android or iOS.
    int SwitchCamera();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetCurrentCameraDirection: queries the current camera type. This method applies to Android or iOS.
    AliEngineCameraDirection GetCurrentCameraDirection();
    Return value description

    The current camera type is returned.

  • SetCameraZoom: sets the zoom factor of the camera. This method applies to Android or iOS.
    int SetCameraZoom(float zoom);
    Parameter description
    Parameter Type Description
    zoom float The zoom factor. Default value: 1.0.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetCameraFlash: specifies whether to enable the camera flash. This method applies to Android or iOS.
    int SetCameraFlash(bool flash);
    Parameter description
    Parameter Type Description
    flash bool Specifies whether to enable the camera flash. Valid values:
    • true: enables the flash.
    • false: disables the flash. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsCameraFocusPointSupported: queries whether the camera supports manual focus. This method applies to Android or iOS.
    bool IsCameraFocusPointSupported();
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • IsCameraExposurePointSupported: queries whether an exposure point can be set for the camera. This method applies to Android or iOS.
    bool IsCameraExposurePointSupported();
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • SetCameraFocusPoint: sets the manual focus point of the camera. This method applies to Android or iOS.
    int SetCameraFocusPoint(float pointX, float pointY);
    Parameter description
    Parameter Type Description
    pointX float The x-coordinate of the focus point.
    pointY float The y-coordinate of the focus point.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetCameraExposurePoint: sets the exposure point of the camera. This method applies to Android or iOS.
    int SetCameraExposurePoint(float pointX, float pointY);
    Parameter description
    Parameter Type Description
    pointX float The x-coordinate of the exposure point.
    pointY float The y-coordinate of the exposure point.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsCameraAutoFocusFaceModeSupported: queries whether the camera supports face focus. This method applies to Android or iOS.
    bool IsCameraAutoFocusFaceModeSupported();
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • SetCameraAutoFocusFaceModeEnabled: specifies whether to enable face focus for the camera. This method applies to Android or iOS.
    bool SetCameraAutoFocusFaceModeEnabled(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable face focus for the camera. Valid values:
    • true: enables face focus.
    • false: disables face focus. This is the default value.
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • StartScreenShareByDesktopId: performs screen sharing based on the desktop ID.
    int StartScreenShareByDesktopId(unsigned int desktopId, const AliEngineScreenShareConfig& config);
    Parameter description
    Parameter Type Description
    desktopId unsigned int The desktop ID. You can call the GetScreenShareSourceInfo method to obtain the ID.
    config const AliEngineScreenShareConfig & The screen sharing configuration.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note If you want to share a specified area, make sure that the resolution of the area is higher than or equal to 16 × 16 pixels. Otherwise, the resolution of the area is reset to 16 × 16 pixels. If the resolution of the area is higher than the resolution of the desktop, the entire desktop is shared.
  • StartScreenShareByScreenRegion: performs screen sharing based on the screen area.
    int StartScreenShareByScreenRegion(const AliEngineScreenShareRegion& screenRegion, const AliEngineScreenShareConfig& config);
    Parameter description
    Parameter Type Description
    screenRegion const AliEngineScreenShareRegion & The position of the screen to be shared relative to the virtual screen.
    config const AliEngineScreenShareConfig & The screen sharing configuration.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note
    • This method applies only to desktop sharing. To share a window, call the StartScreenShareByWindowId method.
    • If you want to share a specified area, make sure that the resolution of the area is higher than or equal to 16 × 16 pixels. Otherwise, the resolution of the area is reset to 16 × 16 pixels. If the resolution of the area is higher than the resolution of the desktop, the entire desktop is shared.
    • For more information about the coordinates of the virtual screen, see The Virtual Screen.
  • StartScreenShareByWindowId: performs screen sharing based on the window ID.
    int StartScreenShareByWindowId(unsigned int windowId, const AliEngineScreenShareConfig& config);
    Parameter description
    Parameter Type Description
    windowId unsigned int The window ID. You can call the GetScreenShareSourceInfo method to obtain the ID.
    config const AliEngineScreenShareConfig & The screen sharing configuration.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartScreenShare: starts screen sharing. This method applies to Android or iOS.
    int StartScreenShare();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopScreenShare: stops screen sharing.
    int StopScreenShare();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UpdateScreenShareConfig: updates the screen sharing configuration.
    int UpdateScreenShareConfig(const AliEngineScreenShareConfig& config);
    Parameter description
    Parameter Type Description
    config const AliEngineScreenShareConfig & The screen sharing configuration.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetScreenShareConfig: queries the screen sharing configuration.
    AliEngineScreenShareConfig GetScreenShareConfig();
    Return value description

    The screen sharing configuration is returned.

  • GetScreenShareSourceInfo: queries the information about screen sharing sources.
    AliEngineScreenSourceList* GetScreenShareSourceInfo(AliEngineScreenShareType sourceType);
    Parameter description
    Parameter Type Description
    sourceType AliEngineScreenShareType The type of the screen sharing source.
    Return value description

    A list of screen sharing sources are returned.

    Note After the screen sharing sources are traversed, call the release method to release related resources from the SDK.
  • GetCurrentScreenShareSourceId: queries the ID of the current screen sharing source.
    unsigned int GetCurrentScreenShareSourceId();
    Return value description

    The ID of the current screen sharing source is returned.

  • GetCurrentScreenShareSourceType: queries the type of the current screen sharing source.
    AliEngineScreenShareType GetCurrentScreenShareSourceType();
    Return value description

    The type of the current screen sharing source is returned.

  • GetDesktopRegion: queries the screen sharing area on the desktop.
    int GetDesktopRegion(const String& sourceId, const String& sourceTitle, AliEngineScreenShareRegion& region);
    Parameter description
    Parameter Type Description
    sourceId const String& The ID of the screen sharing source.
    sourceTitle const String& The name of the screen sharing source.
    region AliEngineScreenShareRegion & The information about the screen sharing area.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioOnlyMode: enables the audio-only mode or the audio-video mode.
    int SetAudioOnlyMode(bool audioOnly);
    Parameter description
    Parameter Type Description
    audioOnly bool Specifies whether to enable the audio-only mode or the audio-video mode. Valid values:
    • true: the audio-only mode. In this mode, only the stream for an audio track is ingested and pulled.
    • false: the audio-video mode. In this mode, the streams for both audio and video tracks are ingested and pulled. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsAudioOnlyMode: queries whether the audio-only mode is enabled.
    bool IsAudioOnlyMode();
    Return value description

    A value of true indicates that the audio-only mode is enabled. A value of false indicates that the audio-video mode is enabled.

  • MuteLocalMic: specifies whether to mute the local audio.
    int MuteLocalMic(bool mute, AliEngineMuteLocalAudioMode mode = AliEngineMuteLocalAudioModeDefault);
    Parameter description
    Parameter Type Description
    mute bool Specifies whether to mute the local audio. Valid values:
    • true: mutes the local audio by sending a mute frame.
    • false: unmutes the local audio. This is the default value.
    mode AliEngineMuteLocalAudioMode The mute mode. By default, the microphone mute mode is used.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note If you set the mute parameter to true, the local audio is muted, but the collection and encoding processes are not affected.
  • MuteRemoteAudio: specifies whether to stop the playback of the audio track of a specific remote user.
    int MuteRemoteAudio(const char *uid,bool mute);
    Parameter description
    Parameter Type Description
    uid const char * The ID of the remote user.
    mute bool Specifies whether to stop the playback of the audio track of a specific remote user. Valid values:
    • true: stops the playback.
    • false: does not stop the playback. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • MuteAllRemoteAudio: specifies whether to stop the playback of the audio tracks of all remote users.
    int MuteAllRemoteAudio(bool mute);
    Parameter description
    Parameter Type Description
    mute bool Specifies whether to stop the playback of the audio tracks of all remote users. Valid values:
    • true: stops the playback.
    • false: does not stop the playback. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartAudioCapture: starts audio collection.
    int StartAudioCapture();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartAudioCapture: starts audio collection. You can call this method to start audio collection in advance. If you do not call this method, the SDK starts audio collection at an appropriate point in time.
    int StartAudioCapture(bool keepAlive);
    Parameter description
    Parameter Type Description
    keepAlive bool The status of the audio collection device. Valid values:
    • true: The audio collection device remains on after you leave the channel. This is the default value.
    • false: The audio collection device is turned off after you leave the channel.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopAudioCapture: stops audio collection.
    int StopAudioCapture();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartAudioPlayer: starts the audio player.
    int StartAudioPlayer();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopAudioPlayer: stops the audio player.
    int StopAudioPlayer();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetRemoteAudioVolume: sets the local playback volume for the audio track of a specific remote user.
    int SetRemoteAudioVolume(const char *uid,int volume);
    Parameter description
    Parameter Type Description
    uid const char * The ID of the remote user.
    int volume The local playback volume. Valid values: 0 to 100. A value of 0 indicates the mute mode. A value of 100 indicates the original volume. Default value: 100.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetDefaultAudioRouteToSpeakerphone: sets the headset or speaker as the default audio output device. This method applies to Android or iOS.
    int SetDefaultAudioRouteToSpeakerphone(bool defaultToSpeakerphone);
    Parameter description
    Parameter Type Description
    defaultToSpeakerphone bool Specifies whether to set the headset or speaker as the default audio output device. Valid values:
    • true: sets the speaker as the default audio output device. This is the default value.
    • false: sets the headset as the default audio output device.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableSpeakerphone: sets the headset or speaker as the audio output device. This method applies to Android or iOS.
    int EnableSpeakerphone(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to set the headset or speaker as the audio output device. Valid values:
    • true: sets the speaker as the audio output device.
    • false: sets the headset as the audio output device. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsEnableSpeakerphone: queries whether the current audio output device is the headset or the speaker. This method applies to Android or iOS.
    bool IsEnableSpeakerphone();
    Return value description

    A value of true indicates that the current audio output device is the headset. A value of false indicates that the current audio output device is the speaker.

  • SetRecordingVolume: sets the recording volume.
    int SetRecordingVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The recording volume. Valid values: 0 to 400. A value of 0 indicates the mute mode. The default value is 100. A value greater than 100 indicates a volume increase. A value less than 100 indicates a volume decrease.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetPlayoutVolume: sets the playback volume.
    int SetPlayoutVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The playback volume. Valid values: 0 to 400. A value of 0 indicates the mute mode. The default value is 100. A value greater than 100 indicates a volume increase. A value less than 100 indicates a volume decrease.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableAudioVolumeIndication: sets the volume callback interval and smoothing factor. By default, the indicators for indicating the volume and the person who speaks are disabled.
    int EnableAudioVolumeIndication(int interval, int smooth, int reportVad);
    Parameter description
    Parameter Type Description
    interval int The interval at which volume callbacks are sent. Unit: milliseconds. The value must be greater than or equal to 10. We recommend that you set this parameter to a value that ranges from 300 to 500. If the value is less than or equal to 0, the indicators for indicating the volume and the person who speaks are disabled.
    smooth int The smoothing factor. Valid values: 0 to 9. A larger value indicates a higher smoothing degree. A lower value indicates a lower smoothing degree but better real-time performance. We recommend that you set this parameter to 3.
    reportVad int The switch used to detect the person who speaks. Valid values:
    • 0: turns off the switch.
    • 1: turns on the switch. You can invoke the onAudioVolumeCallback callback to obtain the status of each person who speaks.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioProfile: sets the audio profile.
    int SetAudioProfile(int audioProfile, int audioScene);
    Parameter description
    Parameter Type Description
    audioProfile int The audio collection or encoding mode. Default value: AliEngineBasicQualityMode. For more information, see AliEngineAudioProfile.
    audioScene int The audio scenario. Default value: AliEngineSceneDefaultMode. For more information, see AliEngineAudioScenario.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetDeviceVolumeType: sets the volume type.
    int SetDeviceVolumeType(int type);
    Parameter description
    Parameter Type Description
    type int The type of the volume. Default value: 0.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableAudioDTX: enables the local audio detection feature for throttling.
    int EnableAudioDTX(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable the local audio detection feature for throttling. Valid values:
    • true: enables the local audio detection feature.
    • false: disables the local audio detection feature. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note Call this method before a stream is ingested. If no audio is detected after you enable the local audio detection feature, RTC performs throttling and reduces the number of bytes to be sent.
  • EnableAudioAMD: enables the microphone audio detection feature for throttling.
    int EnableAudioAMD(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable the microphone audio detection feature for throttling. Valid values:
    • true: enables the microphone audio detection feature.
    • false: disables the microphone audio detection feature. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note Call the method before a stream is ingested. After you enable the microphone audio detection feature, RTC stops sending audio packets if RTC detects that the microphone is muted or disabled.
  • SetAudioEffectVoiceChangerMode: sets the voice change mode.
    int SetAudioEffectVoiceChangerMode(const AliEngineAudioEffectVoiceChangerMode &mode);
    Parameter description
    Parameter Type Description
    mode const AliEngineAudioEffectVoiceChangerMode & The voice change mode. Default value: AliRtcSdk_AudioEffect_Voice_Changer_OFF.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioEffectPitchValue: sets the audio pitch.
    int SetAudioEffectPitchValue(double value);
    Parameter description
    Parameter Type Description
    value double The pitch value. Valid values: 0.5 to 2.0. The default value is 1.0, which indicates that the pitch remains the same.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioEffectReverbMode: sets the sound effect mode.
    int SetAudioEffectReverbMode(const AliEngineAudioEffectReverbMode& mode);
    Parameter description
    Parameter Type Description
    mode const AliEngineAudioEffectReverbMode & The sound effect mode. Default value: AliRtcAudioEffectReverb_Off.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioEffectReverbParamType: sets the sound effect parameter.
    int SetAudioEffectReverbParamType(const AliEngineAudioEffectReverbParamType& type, float value);
    Parameter description
    Parameter Type Description
    type const AliEngineAudioEffectReverbParamType & The sound effect parameter.
    value float The value of the sound effect parameter.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartAudioAccompany: starts audio mixing. This method applies to Android or iOS.
    int StartAudioAccompany(const char *filePath, bool onlyLocalPlay, bool replaceMic, int loopCycles);
    Parameter description
    Parameter Type Description
    filePath const char * The path of the audio mixing file.
    onlyLocalPlay bool Specifies whether to support only local playback.
    replaceMic bool Specifies whether to replace the microphone-collected audio.
    loopCycles int The number of playback loops. You can set this parameter to -1 or a positive integer.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopAudioAccompany: stops audio mixing. This method applies to Android or iOS.
    int StopAudioAccompany();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioAccompanyVolume: sets the volume of the mixed audio. This method applies to Android or iOS.
    int SetAudioAccompanyVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note The volume that you set takes effect only after you call the startAudioAccompany method.
  • SetAudioAccompanyPublishVolume: sets the volume of the mixed audio for stream ingest. This method applies to Android or iOS.
    int SetAudioAccompanyPublishVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note The volume that you set takes effect only after you call the startAudioAccompany method.
  • GetAudioAccompanyPublishVolume: queries the volume of the mixed audio for stream ingest. This method applies to Android or iOS.
    int GetAudioAccompanyPublishVolume();
    Return value description

    The volume of the mixed audio for stream ingest is returned.

  • SetAudioAccompanyPlayoutVolume: sets the volume of the mixed audio for local playback. This method applies to Android or iOS.
    int SetAudioAccompanyPlayoutVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note The volume that you set takes effect only after you call the StartAudioAccompany method.
  • GetAudioAccompanyPlayoutVolume: queries the volume of the mixed audio for local playback. This method applies to Android or iOS.
    int GetAudioAccompanyPlayoutVolume();
    Return value description

    The volume of the mixed audio for local playback is returned.

  • PauseAudioAccompany: pauses audio mixing. This method applies to Android or iOS.
    int PauseAudioAccompany();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • ResumeAudioAccompany: resumes audio mixing. This method applies to Android or iOS.
    int ResumeAudioAccompany();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetAudioAccompanyDuration: queries the duration of a music file. This method applies to Android or iOS.
    int GetAudioAccompanyDuration();
    Return value description

    The duration of the music file is returned. Unit: milliseconds.

  • GetAudioAccompanyCurrentPosition: queries the playback progress of a music file. This method applies to Android or iOS.
    int GetAudioAccompanyCurrentPosition();
    Return value description

    The playback progress of the music file is returned. Unit: milliseconds.

  • SetAudioAccompanyPosition: sets the playback position of a music file. This method applies to Android or iOS.
    int SetAudioAccompanyPosition(int pos);
    Parameter description
    Parameter Type Description
    pos int The position of the progress bar. Unit: milliseconds.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • PreloadAudioEffect: preloads a sound effect. This method applies to Android or iOS.
    int PreloadAudioEffect(unsigned int soundId, const char *filePath);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    filePath const char * The path of the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UnloadAudioEffect: deletes a preloaded sound effect. This method applies to Android or iOS.
    int UnloadAudioEffect(unsigned int soundId);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • PlayAudioEffect: starts the playback of a sound effect. This method applies to Android or iOS.
    int PlayAudioEffect(unsigned int soundId, const char *filePath, int cycles, bool publish);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    filePath const char * The path of the sound effect.
    cycles int The number of playback loops. You can set this parameter to -1 or a positive integer.
    publish bool Specifies whether to ingest a stream for the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopAudioEffect: stops the playback of a sound effect. This method applies to Android or iOS.
    int StopAudioEffect(unsigned int soundId);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopAllAudioEffects: stops the playback of all sound effects. This method applies to Android or iOS.
    int StopAllAudioEffects();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioEffectPublishVolume: sets the volume of a sound effect for stream ingest. This method applies to Android or iOS.
    int SetAudioEffectPublishVolume(unsigned int soundId, int volume);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetAudioEffectPublishVolume: queries the volume of a sound effect for stream ingest. This method applies to Android or iOS.
    int GetAudioEffectPublishVolume(unsigned int soundId);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioEffectPlayoutVolume: sets the volume of a sound effect for local playback. This method applies to Android or iOS.
    int SetAudioEffectPlayoutVolume(unsigned int soundId, int volume);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetAudioEffectPlayoutVolume: queries the volume of a sound effect for local playback. This method applies to Android or iOS.
    int GetAudioEffectPlayoutVolume(unsigned int soundId);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAllAudioEffectsPublishVolume: sets the volume of all sound effects for local playback. This method applies to Android or iOS.
    int SetAllAudioEffectsPublishVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAllAudioEffectsPlayoutVolume: sets the volume of all sound effects for stream ingest. This method applies to Android or iOS.
    int SetAllAudioEffectsPlayoutVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume of the mixed audio. Valid values: 0 to 100. Default value: 50.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • PauseAudioEffect: pauses the playback of a sound effect. This method applies to Android or iOS.
    int PauseAudioEffect(unsigned int soundId);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • PauseAllAudioEffects: pauses the playback of all sound effects. This method applies to Android or iOS.
    int PauseAllAudioEffects();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • ResumeAudioEffect: resumes the playback of a sound effect. This method applies to Android or iOS.
    int ResumeAudioEffect(unsigned int soundId);
    Parameter description
    Parameter Type Description
    soundId unsigned int The ID that is assigned by the user to the sound effect.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • ResumeAllAudioEffects: resumes the playback of all sound effects. This method applies to Android or iOS.
    int ResumeAllAudioEffects();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableEarBack: enables in-ear monitoring. This method applies to Android or iOS.
    int EnableEarBack(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable in-ear monitoring. Valid values:
    • true: enables in-ear monitoring.
    • false: disables in-ear monitoring. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetEarBackVolume: sets the headset volume when in-ear monitoring is enabled. This method applies to Android or iOS.
    int SetEarBackVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume. Valid values: 0 to 100. Default value: 100.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableSystemAudioRecording: specifies whether to enable system audio collection and pushing.
    int EnableSystemAudioRecording(bool enable);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable system audio collection and pushing. Valid values:
    • true: enables system audio collection and pushing.
    • false: disables system audio collection and pushing. This is the default value.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsSystemAudioRecording: queries whether system audio collection and pushing are enabled.
    bool IsSystemAudioRecording();
    Return value description

    A value of true indicates that system audio collection and pushing are enabled. A value of false indicates that system audio collection and pushing are disabled.

  • SetSystemAudioRecordingVolume: sets the volume of system audio that is collected and pushed.
    int SetSystemAudioRecordingVolume(int volume);
    Parameter description
    Parameter Type Description
    volume int The volume. Valid values: 0 to 100. Default value: 100.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetSystemAudioRecordingVolume: queries the current volume of system audio that is collected and pushed.
    int GetSystemAudioRecordingVolume();
    Return value description

    The system volume is returned.

    Note You can set the volume of system audio that is collected and pushed only after you enable system audio collection and pushing. Otherwise, you may fail to set the volume.
  • StartPublishLiveStream: starts relayed live streaming.
    int StartPublishLiveStream(const String& streamURL, const AliEngineLiveTranscodingParam &transcoding);
    Parameter description
    Parameter Type Description
    streamURL const String& The ingest URL for relayed live streaming.
    transcoding const AliEngineLiveTranscodingParam & The parameters for relayed live streaming.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UpdatePublishLiveStream: updates the parameters for relayed live streaming.
    int UpdatePublishLiveStream(const String& streamURL, const AliEngineLiveTranscodingParam &transcoding);
    Parameter description
    Parameter Type Description
    streamURL const String& The ingest URL for relayed live streaming.
    transcoding const AliEngineLiveTranscodingParam & The parameters for relayed live streaming.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopPublishLiveStream: stops relayed live streaming.
    int StopPublishLiveStream(const String& streamURL);
    Parameter description
    Parameter Type Description
    streamURL const String& The ingest URL for relayed live streaming.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UpdateLiveStreamingViewConfig: updates the rendering view and rendering parameters for stream pulling.
    int UpdateLiveStreamingViewConfig(AliEngineVideoCanvas& renderConfig);
    Parameter description
    Parameter Type Description
    renderConfig AliEngineVideoCanvas & The rendering configuration, including the rendering view and rendering mode.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartChannelRelay: starts co-streaming across channels.
    int StartChannelRelay(const AliEngineChannelRelayConfiguration &configuration);
    Parameter description
    Parameter Type Description
    configuration const AliEngineChannelRelayConfiguration & The configuration for co-streaming across channels.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • UpdateChannelRelay: updates the configuration for co-streaming across channels.
    int UpdateChannelRelay(const AliEngineChannelRelayConfiguration &configuration);
    Parameter description
    Parameter Type Description
    configuration const AliEngineChannelRelayConfiguration & The configuration for co-streaming across channels.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopChannelRelay: stops co-streaming across channels.
    int StopChannelRelay();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StartPreview: starts a local preview.
    int StartPreview();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • StopPreview: stops a local preview.
    int StopPreview();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetOnlineRemoteUsers: queries online remote users.
    void GetOnlineRemoteUsers(StringArray &userList);
    Parameter description
    Parameter Type Description
    userList StringArray & The list of user IDs.
  • GetUserInfo: queries the information about a remote user.
    int GetUserInfo(const char *uid,Dictionary &dict);
    Parameter description
    Parameter Type Description
    uid const char * The ID of the user. It is uniquely assigned by the AppServer.
    dict Dictionary & The container provided by the application to store user data. For more information, see the following table.
    Key Description
    userID The ID of the remote user.
    displayName The name of the remote user.
    sessionID The session ID.
    isOnline Indicates whether the remote user is online.
    isCameraMirror Indicates whether mirroring is enabled for the camera track of the remote user.
    isScreenMirror Indicates whether mirroring is enabled for the screen track of the remote user.
    muteAudioPlaying Indicates whether the remote user is muted.
    preferCameraMaster Indicates whether the remote user preferentially ingests the major stream.
    hasCameraView Indicates whether a local view for the camera track of the remote user is configured.
    hasScreenView Indicates whether a local view for the screen track of the remote user is configured.
    hasAudio Indicates whether the stream for the audio track is ingested by the remote user.
    hasCameraMaster Indicates whether the major stream for the camera track is ingested by the remote user.
    hasCameraSlave Indicates whether the minor stream for the camera track is ingested by the remote user.
    hasScreenSharing Indicates whether the stream for the screen track is ingested by the remote user.
    requestAudio Indicates whether the audio track of the remote user is requested.
    requestCameraMaster Indicates whether the major stream for the camera track of the remote user is requested.
    requestCameraSlave Indicates whether the minor stream for the camera track of the remote user is requested.
    requestScreenSharing Indicates whether the stream for the screen track of the remote user is requested.
    subScribedAudio Indicates whether the stream for the audio track of the remote user is pulled.
    subScribedCameraMaster Indicates whether the major stream for the camera track of the remote user is pulled.
    subScribedCamearSlave Indicates whether the minor stream for the camera track of the remote user is pulled.
    subScribedScreenSharing Indicates whether the stream for the screen track of the remote user is pulled.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • IsUserOnline: queries whether a user is online.
    bool IsUserOnline(const char *uid);
    Parameter description
    Parameter Type Description
    uid const char * The ID of the user, It is uniquely assigned by the AppServer.
    Return value description

    A value of true indicates that the user is online. A value of false indicates that the user is offline.

  • SetLogLevel: sets the log level.
    static void SetLogLevel(AliEngineLogLevel logLevel);
    Parameter description
    Parameter Type Description
    logLevel AliEngineLogLevel The log level. Default value: AliEngineLogLevelInfo.
  • GetSDKVersion: queries the version number of the SDK.
    static const char *GetSDKVersion();
    Return value description

    The version number of the SDK is returned.

  • GetErrorDescription: queries an error code.
    static const char* GetErrorDescription(int errorCode);
    Parameter description
    Parameter Type Description
    errorCode int The error code.
    Return value description

    The error code in the STRING format is returned.

  • GetEncodeParam: queries the encoding resolution.
    static void GetEncodeParam(int *width, int *height);
    Parameter description
    Parameter Type Description
    width int * The width.
    height int * The height.
  • SetClientRole: specifies the role of a user.
    int SetClientRole(const AliEngineClientRole clientRole);
    Parameter description
    Parameter Type Description
    clientRole const AliEngineClientRole The role of the user. The default value is AliEngineClientRoleLive, which indicates a viewer. This parameter takes effect only in non-communication mode.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetClientRole: queries the role of a user.
    AliEngineClientRole GetClientRole();
    Return value description

    The role of the user is returned.

  • StartLastmileDetect: starts network quality monitoring.
    int StartLastmileDetect();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note Call this method before you call the JoinChannel method. You can invoke the OnLastmileDetectResultWithQuality callback to obtain the monitoring result.
  • StopLastmileDetect: stops network quality monitoring.
    int StopLastmileDetect();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • PostFeedback: gives feedback on an SDK issue.
    void PostFeedback(const char *uid, const char *channelId, const char *description, const AliEngineFeedbackType type, long long timeStamp);
    Parameter description
    Parameter Type Description
    uid const char * The ID of the current user. You can leave this parameter empty.
    channelId const char * The ID of the current channel. You can leave this parameter empty.
    description const char * The description of the issue. You cannot leave this parameter empty.
    type const AliEngineFeedbackType The type of the issue.
    timeStamp long long The UNIX timestamp when the issue occurred. You can set this parameter to an approximate timestamp or 0.
  • SendMediaExtensionMsg: sends extended media information.
    int SendMediaExtensionMsg(unsigned char *message, unsigned int length, int repeatCount);
    Parameter description
    Parameter Type Description
    message unsigned char * The extended information of the instance.
    length unsigned int The length of the extended information.
    repeatCount int The number of times that the extended information is repeatedly sent.
    Return value description
    • 0: The call is successful.
    • -1: No stream is ingested.
    • -2: A parameter is invalid.
    • -3: The extended information was sent for many times in a short period of time. Try again later.
  • StartIntelligentDenoise: enables intelligent noise reduction.
    int StartIntelligentDenoise();
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

    Note You can call this method to enable intelligent noise reduction during a voice or video call.
  • StopIntelligentDenoise: disables intelligent noise reduction.
    void StopIntelligentDenoise();
  • RefreshAuthInfo: refreshes the authentication information.
    int RefreshAuthInfo(const AliEngineAuthInfo &authInfo);
    Parameter description
    Parameter Type Description
    authInfo const AliEngineAuthInfo & The authentication information.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetAudioSessionOperationRestriction: specifies the control permission of the SDK on AVAudioSession. This method applies to iOS.
    int SetAudioSessionOperationRestriction(AliEngineAudioSessionOperationRestriction restriction);
    Parameter description
    Parameter Type Description
    restriction AliEngineAudioSessionOperationRestriction The control permission on AVAudioSession. Default value: AliEngineAudioSessionOperationRestrictionNone.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetCurrentConnectionStatus: queries the current status of network connection.
    AliEngineConnectionStatus GetCurrentConnectionStatus();
    Return value description

    The current status of network connection is returned. For more information, see AliEngineConnectionStatus.

  • GetPublishLiveStreamState: queries the status of relayed live streaming.
    AliEngineLiveTranscodingState GetPublishLiveStreamState(const String& streamURL);
    Parameter description
    Parameter Type Description
    streamURL const String& The ingest URL for relayed live streaming.
    Return value description

    The status of relayed live streaming is returned.

  • ShowDebugView: displays the user debugging data.
    int ShowDebugView(void* view,const AliEngineShowDebugViewType showType,const char *uid);
    Parameter description
    Parameter Type Description
    view void * The display view, which is subject to the actual business requirements.
    showType AliEngineShowDebugViewType The display type. Valid values:
    • 0: displays no data. This is the default value.
    • 1: displays the audio data.
    • 2: displays the video data.
    • 3: displays the network data.
    • 4: displays all data.
    Note You can set this parameter to a special value to display private data.
    uid const char * The ID of the corresponding user.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableBackgroundExchange: enables or disables the background replacement feature.
    int EnableBackgroundExchange(bool enable, const char* path,const AliEngineBokehScaleModel model);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable the background replacement feature. Valid values:
    • true: enables the background replacement feature.
    • false: disables the background replacement feature.
    path const char* The path of the local image in the JPG or PNG format.
    model const AliEngineBokehScaleModel The scaling mode of the background image. Valid values:
    • AliEngineBokehScaleModelCrop: The background image is cropped at the original aspect ratio.
    • AliEngineBokehScaleModelFill: The background image is cropped with black borders.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • EnableBackgroundBlur: enables or disables the background blur feature.
    int EnableBackgroundBlur(bool enable, uint32_t degree);
    Parameter description
    Parameter Type Description
    enable bool Specifies whether to enable the background blur feature. Valid values:
    • true: enables the background blur feature.
    • false: disables the background blur feature.
    degree uint32_t The degree of blurring. Valid values: 0 to 100.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • SetRecordingDeviceMute: specifies whether to mute an audio collection device.
    int SetRecordingDeviceMute(bool mute);
    Parameter description
    Parameter Type Description
    mute bool Specifies whether to mute an audio collection device.
    • true: mutes the audio collection device.
    • false: unmutes the audio collection device.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetRecordingDeviceMute: queries whether an audio collection device is muted.
    bool GetRecordingDeviceMute();
    Return value description

    A value of true indicates that the audio collection device is muted. A value of false indicates that the audio collection device is unmuted.

  • SetPlaybackDeviceMute: specifies whether to mute an audio player.
    int SetPlaybackDeviceMute(bool mute);
    Parameter description
    Parameter Type Description
    mute bool Specifies whether to mute an audio player.
    • true: mutes the audio player.
    • false: unmutes the audio player.
    Return value description

    A value of 0 indicates that the call is successful. A value other than 0 indicates that the call failed.

  • GetPlaybackDeviceMute: queries whether an audio player is muted.
    bool GetPlaybackDeviceMute();
    Return value description

    A value of true indicates that the audio player is muted. A value of false indicates that the audio player is unmuted.

  • GetIfUserFetchObserverData: specifies whether a user obtains the video output data.
    bool GetIfUserFetchObserverData();
    Return value description

    A value of true indicates that a user obtains the video output data. A value of false indicates that the SDK invokes a callback to obtain the video output data. Default value: false.

  • GetVideoAlignment: queries the width alignment of the output video.
    AliEngineVideoObserAlignment GetVideoAlignment();
    Return value description

    The width alignment of the output video is returned. Default value: AliEngineAlignmentDefault.

  • GetObserverDataMirrorApplied: queries whether the video output data requires mirroring.
    bool GetObserverDataMirrorApplied();
    Return value description

    A value of true indicates that the video output data requires mirroring. A value of false indicates that the video output data does not require mirroring. Default value: false.

  • GetSmoothRenderingEnabled: queries whether the generated stream pulling data for a video track is smoothed.
    bool GetSmoothRenderingEnabled();
    Return value description

    A value of true indicates that the generated stream pulling data for a video track is smoothed. A value of false indicates that the stream pulling data for a video track is generated without being smoothed. By default, false is returned.

  • GetVideoCaptureData: proactively obtains the collected data.
    bool GetVideoCaptureData(AliEngineVideoTrack type, AliEngineVideoRawData &videoRaw);
    Parameter description
    Parameter Type Description
    type AliEngineVideoTrack The type of the video track.
    videoRaw AliEngineVideoRawData & The information about the video raw data.
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • GetVideoPreEncoderData: proactively obtains the raw data.
    bool GetVideoPreEncoderData(AliEngineVideoTrack type, AliEngineVideoRawData &videoRaw);
    Parameter description
    Parameter Type Description
    type AliEngineVideoTrack The type of the video track.
    videoRaw AliEngineVideoRawData & The information about the video raw data.
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.

  • GetVideoRenderData: proactively obtains the stream pulling data.
    bool GetVideoRenderData(const char *uid,AliEngineVideoTrack type, AliEngineVideoRawData &videoRaw);
    Parameter description
    Parameter Type Description
    uid const char * The ID of the remote user.
    type AliEngineVideoTrack The type of the video track.
    videoRaw AliEngineVideoRawData & The information about the video raw data.
    Return value description

    A value of true indicates that the call is successful. A value of false indicates that the call failed.