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 |
Specifies whether to enable the HTML5 compatibility mode. | 1.1 | |
Queries whether the HTML5 compatibility mode is enabled. | 1.1 | |
Creates an AliEngine instance. | 2.1 | |
Destroys an AliEngine instance. | 1.1 | |
Uploads logs. | 1.15 | |
Sets the path for storing the log files of the SDK. | 1.16.2 | |
Configures a callback. | 2.1 | |
Queries a class instance. | 2.1 |
Channel-related methods
Method | Description | Supported minimum version |
Joins a channel. | 1.1 | |
Leaves a channel. | 1.1 | |
Switches to another channel. | 2.1 | |
Checks whether you are in a channel. | 1.1 | |
Sets the channel mode. | 1.15 | |
Creates a subchannel. | 2.1 | |
Destroys the subchannel that is created by the calling the CreateChannel method. | 2.1 |
Stream ingest-related methods
Method | Description | Supported minimum version |
Specifies whether to enable stream ingest for a video track. | 2.1 | |
Queries whether stream ingest is enabled for a video track. | 1.1 | |
Queries whether stream ingest is enabled for a screen track. | 1.1 | |
Specifies whether to enable stream ingest for an audio track. | 2.1 | |
Queries whether stream ingest is enabled for an audio track. | 1.1 | |
Specifies whether to enable stream ingest for the minor stream of a video track. | 2.1 | |
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 |
Specifies the type of the stream to be pulled for a camera track. | 2.1 | |
Specifies the type of the stream to be pulled by default for a camera track. | 2.1 | |
Specifies whether to pull a stream for an audio track by default. | 2.1 | |
Pulls or stops pulling streams for the audio tracks of all remote users. | 2.1 | |
Pulls or stops pulling a stream for the audio track of a specific remote user. | 2.1 | |
Specifies whether to pull a stream for a video track by default. | 2.1 | |
Pulls or stops pulling streams for the video tracks of all remote users. | 2.1 | |
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 |
Sets the encoding properties for screen sharing. | 2.1 | |
Sets the rendering view and drawing parameters for local preview. | 1.1 | |
Sets the collection preference of a camera. | 2.1 | |
Sets the display orientation of a device. This method applies to Android or iOS. | 2.1 | |
Specifies whether to disable or re-enable local video collection. | 2.1 | |
Specifies whether to stop ingesting a stream for a local video track. | 1.1 | |
Renders or stops rendering the video tracks of all remote users. | 2.1 | |
Sets the rendering view and drawing parameters for the video track of a remote user. | 1.1 | |
Updates the rendering configuration. | 2.1 | |
Queries whether the camera is enabled. | 1.1 | |
Stops recording. | 1.17 | |
Starts recording in non-layout mode. | 1.17 | |
Starts recording based on the system layout. | 2.1 | |
Updates the recording information. | 2.1 | |
Creates a recording template. | 2.1 | |
Pauses recording. | 2.1 | |
Resumes recording. | 2.1 | |
Specifies whether to enable basic retouching. | 1.17.9 | |
Sets video encoding properties. | 2.1 | |
Adds a watermark. | 2.1 | |
Removes the watermark information from a video track. | 2.1 | |
Captures a snapshot. | 2.1 | |
Switches between the front and rear cameras. This method applies to Android or iOS. | 2.1 | |
Queries the current camera type. This method applies to Android or iOS. | 2.1 | |
Sets the zoom factor of the camera. This method applies to Android or iOS. | 2.1 | |
Specifies whether to enable the camera flash. This method applies to Android or iOS. | 2.1 | |
Queries whether the camera supports manual focus. This method applies to Android or iOS. | 2.1 | |
Queries whether an exposure point can be set for the camera. This method applies to Android or iOS. | 2.1 | |
Sets the manual focus point of the camera. This method applies to Android or iOS. | 2.1 | |
Sets the exposure point of the camera. This method applies to Android or iOS. | 2.1 | |
Queries whether the camera supports face focus. This method applies to Android or iOS. | 2.1 | |
Specifies whether to enable face focus for the camera. This method applies to Android or iOS. | 2.1 | |
Specifies whether a user obtains the video output data. | 2.4 | |
Queries the width alignment of the output video. | 2.4 | |
Queries whether the video output data requires mirroring. | 2.4 | |
Queries whether the generated stream pulling data for a video track is smoothed. | 2.4 | |
Proactively obtains the collected data. | 2.4 | |
Proactively obtains the raw data. | 2.4 | |
Proactively obtains the stream pulling data. | 2.4 |
Methods related to screen sharing
Method | Description | Supported minimum version |
Performs screen sharing based on the desktop ID. | 2.1 | |
Performs screen sharing based on the screen area. | 2.1 | |
Performs screen sharing based on the window ID. | 2.1 | |
Starts screen sharing. This method applies to Android or iOS. | 2.1 | |
Stops screen sharing. | 2.1 | |
Updates the screen sharing configuration. | 2.1 | |
Queries the screen sharing configuration. | 2.1 | |
Queries the information about screen sharing sources. | 2.1 | |
Queries the ID of the current screen sharing source. | 2.1 | |
Queries the type of the current screen sharing source. | 2.1 | |
Queries the screen sharing area on the desktop. | 2.1 |
Audio-related methods
Method | Description | Supported minimum version |
Enables the audio-only mode or the audio-video mode. | 1.1 | |
Queries whether the audio-only mode is enabled. | 1.1 | |
Specifies whether to mute the local audio. | 1.1 | |
Specifies whether to stop the playback of the audio track of a specific remote user. | 1.1 | |
Specifies whether to stop the playback of the audio tracks of all remote users. | 1.16.2 | |
Starts audio collection. | 1.11 | |
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 | |
Stops audio collection. | 1.11 | |
Starts the audio player. | 1.11 | |
Stops the audio player. | 1.11 | |
Sets the local playback volume for the audio track of a specific remote user. | 2.1 | |
Sets the headset or speaker as the default audio output device. This method applies to Android or iOS. | 2.1 | |
Sets the headset or speaker as the audio output device. This method applies to Android or iOS. | 2.1 | |
Queries whether the current audio output device is the headset or the speaker. This method applies to Android or iOS. | 2.1 | |
Sets the recording volume. | 1.16.2 | |
Sets the playback volume. | 1.16.2 | |
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 | |
Sets the audio profile. | 2.1 | |
Sets the volume type. This method applies to iOS. | 2.1 | |
Enables the local audio detection feature for throttling. | 2.1 | |
Enables the microphone audio detection feature for throttling. | 2.1 | |
Sets the voice change mode. | 2.1 | |
Sets the audio pitch. | 2.1 | |
Sets the sound effect mode. | 2.1 | |
Sets the sound effect parameters. | 2.1 | |
Starts audio mixing. This method applies to Android or iOS. | 2.1 | |
Stops audio mixing. This method applies to Android or iOS. | 2.1 | |
Sets the volume of the mixed audio. This method applies to Android or iOS. | 2.1 | |
Sets the volume of the mixed audio for stream ingest. This method applies to Android or iOS. | 2.1 | |
Queries the volume of the mixed audio for stream ingest. This method applies to Android or iOS. | 2.1 | |
Sets the volume of the mixed audio for local playback. This method applies to Android or iOS. | 2.1 | |
Queries the volume of the mixed audio for local playback. This method applies to Android or iOS. | 2.1 | |
Pauses audio mixing. This method applies to Android or iOS. | 2.1 | |
Resumes audio mixing. This method applies to Android or iOS. | 2.1 | |
Queries the duration of a music file. This method applies to Android or iOS. | 2.1 | |
Queries the playback progress of a music file. This method applies to Android or iOS. | 2.1 | |
Sets the playback position of a music file. This method applies to Android or iOS. | 2.1 | |
Preloads a sound effect. This method applies to Android or iOS. | 2.1 | |
Deletes a preloaded sound effect. This method applies to Android or iOS. | 2.1 | |
Starts the playback of a sound effect. This method applies to Android or iOS. | 2.1 | |
Stops the playback of a sound effect. This method applies to Android or iOS. | 2.1 | |
Stops the playback of all sound effects. This method applies to Android or iOS. | 2.1 | |
Sets the volume of a sound effect for stream ingest. This method applies to Android or iOS. | 2.1 | |
Queries the volume of a sound effect for stream ingest. This method applies to Android or iOS. | 2.1 | |
Sets the volume of a sound effect for local playback. This method applies to Android or iOS. | 2.1 | |
Queries the volume of a sound effect for local playback. This method applies to Android or iOS. | 2.1 | |
Sets the volume of all sound effects for local playback. This method applies to Android or iOS. | 2.1 | |
Sets the volume of all sound effects for stream ingest. This method applies to Android or iOS. | 2.1 | |
Pauses the playback of a sound effect. This method applies to Android or iOS. | 2.1 | |
Pauses the playback of all sound effects. This method applies to Android or iOS. | 2.1 | |
Resumes the playback of a sound effect. This method applies to Android or iOS. | 2.1 | |
Resumes the playback of all sound effects. This method applies to Android or iOS. | 2.1 | |
Enables in-ear monitoring. This method applies to Android or iOS. | 2.1 | |
Sets the headset volume when in-ear monitoring is enabled. This method applies to Android or iOS. | 2.1 | |
Specifies whether to enable system audio collection and pushing. | 2.1 | |
Queries whether system audio collection and pushing are enabled. | 2.1 | |
Sets the volume of system audio that is collected and pushed. | 2.1 | |
Queries the current volume of system audio that is collected and pushed. | 2.1 | |
Specifies whether to mute an audio collection device. | 2.4 | |
Queries whether an audio collection device is muted. | 2.4 | |
Specifies whether to mute an audio player. | 2.4 | |
Queries whether an audio player is muted. | 2.4 |
Methods related to relayed live streaming
Method | Description | Supported minimum version |
Starts relayed live streaming. | 2.4 | |
Updates the parameters for relayed live streaming. | 2.4 | |
Stops relayed live streaming. | 2.1 | |
Updates the rendering view and rendering parameters for stream pulling. | 2.1 | |
Queries the status of relayed live streaming. | 2.4 |
Methods related to co-streaming across channels
Method | Description | Supported minimum version |
Starts co-streaming across channels. | 2.1 | |
Updates the configuration for co-streaming across channels. | 2.1 | |
Stops co-streaming across channels. | 2.1 | |
Enables or disables the background replacement feature. | 2.4 | |
Enables or disables the background blur feature. | 2.4 |
Preview-related methods
Method | Description | Supported minimum version |
Starts a local preview. | 1.1 | |
Stops a local preview. | 1.1 |
Methods for querying remote users
Method | Description | Supported minimum version |
Queries online remote users. | 1.1 | |
Queries the information about a remote user. | 1.1 | |
Queries whether a user is online. | 1.1 |
Other methods
Method | Description | Supported minimum version |
Sets the log level. | 1.1 | |
Queries the version number of the SDK. | 1.1 | |
Queries an error code. | 2.1 | |
Queries the encoding resolution. | 2.1 | |
Specifies the role of a user. | 1.16 | |
Queries the role of a user. | 1.17.19 | |
Starts network quality monitoring. | 1.16.2 | |
Stops network quality monitoring. | 1.16.2 | |
Gives feedback on an SDK issue. | 1.17.12 | |
Sends extended media information. | 1.17.1 | |
Enables intelligent noise reduction. | 1.17.19 | |
Disables intelligent noise reduction. | 1.17.19 | |
Refreshes the authentication information. | 1.17.41 | |
Specifies the control permission of the SDK on AVAudioSession. This method applies to iOS. | 2.1 | |
Queries the current status of network connection. | 2.1 | |
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.
ImportantYou 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.
ImportantYou can create only one primary instance.
Destroy: destroys an AliEngine instance.
static AliEngine::Destroy();ImportantCall 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.
ImportantWe 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
The type of the class.
pInterface
void**
A secondary pointer to a device management class or media engine class.
If the iid parameter is set to AliEngineInterfaceAudioDeviceManger, IAliEngineAudioDeviceManager is returned.
If the iid parameter is set to AliEngineInterfaceVideoDeviceManger, IAliEngineVideoDeviceManager is returned.
If the iid parameter is set to AliEngineInterfaceMediaEngine, IAliEngineMediaEngine is returned.
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.
NoteIf 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.
NoteFor 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.
NoteThis 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
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.
NoteYou 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
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
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
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
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
The rendering configuration, including the rendering view and rendering mode.
track
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.
NoteYou 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
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
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
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.
NoteYou 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
The rendering configuration, including the rendering view and rendering mode.
uid
const char *
The ID of the remote user.
track
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
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
The recording type.
recordFormat
The recording format.
filePath
const char *
The file path.
audioConfig
The settings for audio recording.
videoConfig
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
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.
NoteThis method supports only skin whitening and skin smoothing.
SetVideoEncoderConfiguration: sets video encoding properties.
void SetVideoEncoderConfiguration(const AliEngineVideoEncoderConfiguration& config);Parameter description
Parameter
Type
Description
config
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
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
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.
NoteYou 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.
NoteIf 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.
NoteThis 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
The type of the screen sharing source.
Return value description
A list of screen sharing sources are returned.
NoteAfter 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
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
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.
NoteIf 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.
NoteCall 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.
NoteCall 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
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
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.
NoteThe 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.
NoteThe 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.
NoteThe 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.
NoteYou 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
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
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
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
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.
NoteCall this method before you call the JoinChannel method. You can invoke the OnLastmileDetectResultWithQuality callback to obtain the monitoring result.
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.
NoteYou 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
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
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.
NoteYou 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
The type of the video track.
videoRaw
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
The type of the video track.
videoRaw
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
The type of the video track.
videoRaw
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.