This topic describes the interfaces of the ApsaraVideo Real-time Communication Mac SDK.
Table of contents
Basic interfaces
API | Function Description |
Gets an AliRtcEngine instance. | |
Destroys the engine. | |
Destroys the engine with a callback. | |
Sets the H5 compatibility mode. | |
Checks whether H5 compatibility mode is enabled. | |
Gets the SDK version number. |
Channel-related interfaces
API | Function Description |
Sets the channel profile. | |
Sets the audio profile. | |
Checks whether the current mode is audio-only. | |
Sets the mode to audio-only or audio and video. | |
Joins a channel. | |
Joins a channel. | |
Joins a channel. | |
Joins a channel. | |
Leaves the channel. | |
Checks whether the user is in the channel. | |
Sets the user role. | |
Gets the user role. | |
Refreshes the authentication information. | |
Refreshes the authentication information. |
Publishing and subscription interfaces
API | Function Description |
Sets whether to publish the local audio stream. The audio stream is published by default. | |
Checks whether the local audio stream is being published. | |
Sets whether to subscribe to remote audio streams by default. By default, all remote audio streams are subscribed. Call this interface before you join a channel. | |
Stops or resumes receiving all remote audio streams. | |
Stops or resumes receiving the audio stream of a specific remote user. | |
Sets whether to publish the video stream. | |
Checks whether the local video stream is being published. | |
Sets whether to subscribe to remote video streams by default. By default, all remote video streams are subscribed. Call this interface before you join a channel. | |
Stops or resumes receiving all remote video streams. | |
Stops or resumes receiving the media stream of a specific remote user. Use this interface when you need to control both audio and video streams. | |
Stops or resumes subscribing to the audio and video streams of a remote user. | |
Stops or resumes receiving the media stream of a specific remote user in another channel. | |
Subscribes to the streams of all users in a destination channel. | |
Stops or resumes subscribing to the video stream of a remote user. | |
Sets the volume of a remote audio stream. |
Audio device management interfaces
API | Function Description |
Stops or resumes publishing the local audio stream. | |
Stops or resumes playing a remote audio stream. | |
Stops or resumes playing all remote audio streams. | |
Starts audio capture. | |
Starts audio capture. | |
Stops audio capture. | |
Enables the volume detection feature. | |
Enables in-ear monitoring. | |
Starts audio playback. | |
Stops audio playback. | |
Sets the playback volume. | |
Sets the capture volume. | |
Starts testing the audio playback device. | |
Stops testing the audio playback device. | |
Starts testing the audio capture device. | |
Stops testing the audio capture device. |
Voice changer and reverberation
API | Function Description |
Sets the voice changer effect mode. | |
Sets the pitch shifting parameter. | |
Sets the reverberation effect mode. | |
Sets the reverberation effect type and specific parameters. |
Custom audio input
API | Function Description |
Adds an external audio stream. | |
Inputs external audio stream data. | |
Sets the publishing volume. | |
Gets the publishing volume. | |
Sets the playback volume for the external audio stream. | |
Gets the playback volume of the external audio stream. | |
Deletes the external stream. |
Audio accompaniment
API | Function Description |
Gets information about the audio accompaniment file. | |
Starts playing the accompaniment file. | |
Stops playing the accompaniment file. | |
Sets the accompaniment volume. | |
Sets the publishing volume of the accompaniment file. | |
Gets the publishing volume of the accompaniment file. | |
Sets the playback volume of the accompaniment file. | |
Gets the playback volume of the accompaniment file. | |
Pauses accompaniment playback. | |
Resumes accompaniment playback. | |
Gets the duration of the accompaniment file. | |
Gets the current playback position of the accompaniment. | |
Sets the accompaniment playback position. |
Sound effect files
API | Function Description |
Preloads a sound effect file. | |
Deletes a preloaded sound effect file. | |
Starts playing a sound effect. | |
Stops playing a sound effect. | |
Stops playing all sound effects. | |
Pauses a sound effect. | |
Pauses all sound effects. | |
Resumes a specified sound effect file. | |
Resumes all sound effect files. | |
Sets the mixing volume for publishing a sound effect. | |
Gets the mixing volume for publishing a sound effect. | |
Sets the mixing volume for publishing all sound effects. | |
Sets the local playback volume of a sound effect. | |
Gets the local playback volume of a sound effect. | |
Sets the local playback volume for all sound effects. |
Record audio and video files
API | Function Description |
Records audio and video files (AAC, WAV, MP4). | |
Stops recording audio and video files. |
Video device management interfaces
API | Function Description |
Sets the rendering window and drawing parameters for the local preview. | |
Sets camera capture preferences. | |
Disables or re-enables local video capture. | |
Sets whether to stop publishing the local video stream. | |
Sets the rendering window and drawing parameters for a remote video. | |
Checks whether the camera is on. | |
Sets video encoding properties. | |
Sets video decoding properties. | |
Starts the local preview. | |
Stops the local preview. | |
Sets the mirroring capabilities for preview and publishing. | |
Sets the capture scaling timing, which determines whether video data is scaled immediately upon capture or during encoding. |
Configure video data callbacks
API | Function Description |
Registers a video data callback. | |
Unregisters a video data callback. | |
Takes a snapshot of the camera video. | |
Registers a video data output callback. | |
Unregisters the video data output callback. |
Configure audio data callbacks
API | Function Description |
Sets audio callback parameters. | |
Registers an audio data callback. |
Custom video input
API | Function Description |
Enables an external video input source. | |
Inputs video data. |
Screen sharing interfaces
API | Function Description |
Starts publishing the screen sharing stream. | |
Starts publishing the screen sharing stream. | |
Stops publishing the screen sharing stream. | |
Sets the volume of the shared audio stream. | |
Checks whether screen sharing is being published. | |
Configures the screen sharing encoding parameters. |
Bypass live streaming interfaces
API | Function Description |
Starts bypass live streaming. | |
Updates bypass live streaming parameters. | |
Stops bypass live streaming. | |
Gets the bypass live streaming status. |
Network quality detection interfaces
API | Function Description |
Starts network quality detection. | |
Stops network quality detection. |
SEI
API | Function Description |
Pushes an SEI stream. | |
Pushes an SEI stream (extended). |
Other interfaces
API | Function Description |
Sets custom parameters. | |
Gets custom parameters. | |
Sets the path to save the SDK log file. | |
Sets the log level. | |
Sets the device orientation. | |
Gets the network timestamp. | |
Sends a data channel message. |
Callback events
API | Function Description |
Callback for network connection status. The customer needs to handle this callback. | |
Callback for local device exceptions. The customer needs to handle this callback. | |
Notification that the user authentication information is about to expire. The authentication expires 30 seconds after this notification is received. The customer needs to handle this callback. | |
The server returns an information expiration message when the user calls an interface that requires authentication. | |
Callback for the result of joining a channel. | |
Callback for the result of joining a channel. | |
Callback for the result of leaving a channel. | |
Notification that a remote user has gone offline. | |
Notification that a remote user has come online. | |
Notification about remote stream publishing information. | |
Message indicating that the user was kicked out by the server or the session has ended. | |
Notification of a change in the audio publishing state. | |
Notification of a change in the audio subscription state. | |
Notification that a remote user is muted. | |
Notification that an audio device interruption has started. | |
Notification that an audio device interruption has ended. | |
Callback for a change in the video publishing state. | |
Callback for a change in the camera stream subscription state. | |
Notification that a remote user is sending black video frames. | |
Notification that a remote user has disabled camera stream capture. | |
A remote user's application has moved to the background. | |
A remote user's application has returned to the foreground. | |
Callback for when local sound effect playback finishes. | |
The audio volume, speech status, and UID of the subscribed audio. | |
Callback for active speaker detection. | |
Callback for a change in the bypass stream publishing state. | |
Callback for a change in the bypass task state. | |
Callback for a change in network quality. | |
Callback for network quality detection. | |
Callback for the result of network quality detection. | |
This callback notifies the application of an engine error. | |
Callback for the first audio packet sent. | |
Callback for the first video frame received. | |
Callback for the first video packet sent. | |
Callback for the first audio packet received. | |
Callback for the first decoded remote audio frame. | |
This message is triggered when the first video frame of a remote user is displayed. | |
This message is triggered when the first video frame is displayed in the preview. | |
Callback for the volume from the pre-call audio capture test. | |
Callback for the local accompaniment playback state. | |
Callback for when a remote user starts accompaniment playback. | |
Callback for when a remote user finishes accompaniment playback. | |
Real-time data callback (triggered every 2 seconds). | |
Local video statistics (triggered every 2 seconds). | |
Remote video statistics (triggered every 2 seconds). | |
Local audio statistics (triggered every 2 seconds). | |
Remote audio statistics (triggered every 2 seconds). | |
Callback for receiving a media extension message. | |
Snapshot callback. | |
Callback for the local audio capture device state. | |
Callback for the local video capture device state. | |
Callback indicating that you can start sending data channel messages. | |
Callback for data channel messages. | |
Callback for a change in the screen sharing publishing state. |
AliRtcAudioFrameDelegate
API | Function Description |
Callback for captured raw data. | |
Callback for data after 3A processing. | |
Callback for published stream data. | |
Callback for playback data. | |
Callback for remote stream data. |
AliRtcEngineDestroyDelegate
API | Function Description |
Callback for when the engine is destroyed. The engine is considered destroyed only after this callback is executed. |
AliRtcVideoFrameDelegate
API | Function Description |
Callback for captured video frames. | |
Callback for subscribed local video data before encoding. | |
Callback for subscribed remote video data. | |
Video data output format. | |
Video data output position. |