Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through a virtual global network optimized for real-time web and mobile-to-mobile applications.
As of v2.3.3, Agora C++ API Reference for All Platforms can be downloaded from Dash.
Core methods are used for creating an RTC engine and setting up a basic communication channel. This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
createAgoraRtcEngine | Creates an RtcEngine object and returns the pointer. |
initialize | Initializes the Agora SDK service. |
release | Releases all IRtcEngine resources. |
setChannelProfile | Sets the channel profile. |
setClientRole | Sets the role of the user (Live Broadcast only). |
joinChannel | Allows a user to join a channel. |
leaveChannel | Allows a user to leave a channel. |
renewToken | Renews the Token |
enableWebSdkInteroperability | Enables interoperability with the Agora Web SDK. (Live Broadcast only.) |
getConnectionState | Gets the connection state of the SDK. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
enableAudio | Enables the audio module. |
disableAudio | Disables the audio module. |
setAudioProfile | Sets the audio parameters and application scenarios. |
adjustRecordingSignalVolume | Adjusts the recording volume. |
adjustPlaybackSignalVolume | Adjusts the playback volume. |
enableAudioVolumeIndication | Enables the onAudioVolumeIndication callback at a set time interval to report on which users are speaking and the speakers' volume. |
enableLocalAudio | Enables/Disables the local audio sampling. |
muteLocalAudioStream | Sends/Stops sending the local audio stream. |
muteRemoteAudioStream | Receives/Stops receiving a specified remote user’s audio stream. |
muteAllRemoteAudioStreams | Receives/Stops receiving all remote users' audio streams. |
setDefaultMuteAllRemoteAudioStreams | Sets whether to receive audio streams by default. |
This group of methods is applicable to Video Communication and Video Broadcasting.
Method | Description |
---|---|
enableVideo | Enables the video module. |
disableVideo | Disables the video module. |
setVideoEncoderConfiguration | Sets the video encoder configuration. |
setupLocalVideo | Sets the local video view. |
setupRemoteVideo | Sets the remote user's video view. |
setLocalRenderMode | Sets the local video display mode. |
setRemoteRenderMode | Sets the video display mode of a specified remote user. |
startPreview | Starts the local video preview before joining the channel. |
stopPreview | Stops the local video preview. |
enableLocalVideo | Enables/Disables the local video capture. |
muteLocalVideoStream | Sends/Stops sending the local video stream. |
muteRemoteVideoStream | Receives/Stops receiving a specified remote video stream. |
muteAllRemoteVideoStreams | Receives/Stops receiving all the video streams. |
setDefaultMuteAllRemoteVideoStreams | Sets whether to receive the video streams by default. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
setInEarMonitoringVolume | Sets the volume of the in-ear monitor. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
setLocalVoicePitch | Changes the voice pitch of the local speaker. |
setLocalVoiceEqualization | Sets the local voice equalization effect. |
setLocalVoiceReverb | Sets the local voice reverberation. |
setLocalVoiceChanger | Sets the local voice changer option. |
setLocalVoiceReverbPreset | Sets the preset local voice reverberation effect. |
enableSoundPositionIndication | Enables/Disables stereo panning for remote users. |
setRemoteVoicePosition | Sets the sound position and gain of a remote user. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
startAudioMixing | Starts playing and mixing the music file. |
stopAudioMixing | Stops playing and mixing the music file. |
pauseAudioMixing | Pauses playing and mixing the music file. |
resumeAudioMixing | Resumes playing and mixing the music file. |
adjustAudioMixingVolume | Adjusts the volume during audio mixing. |
adjustAudioMixingPlayoutVolume | Adjusts the volume of audio mixing for local playback. |
adjustAudioMixingPublishVolume | Adjusts the volume of audio mixing for remote playback. |
getAudioMixingDuration | Gets the duration (ms) of the music file. |
getAudioMixingCurrentPosition | Retrieves the playback position (ms) of the music file. |
setAudioMixingPosition | Sets the playback position of the music file. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
getEffectsVolume | Gets the volume of the audio effects. |
setEffectsVolume | Sets the volume of the audio effects. |
setVolumeOfEffect | Sets the volume of the audio effect. |
playEffect | Plays a specified audio effect. |
stopEffect | Stops playing a specified audio effect. |
stopAllEffects | Stops playing all audio effects. |
preloadEffect | Preloads a specified audio effect file into the memory. |
unloadEffect | Releases a specified audio effect from the memory. |
pauseEffect | Pauses a specified audio effect. |
pauseAllEffects | Pauses all audio effects. |
resumeEffect | Resumes playing a specified audio effect. |
resumeAllEffects | Resumes playing all audio effects. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
startAudioRecording | Starts an audio recording on the client. |
stopAudioRecording | Stops an audio recording on the client. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
enableLoopbackRecording | Enables loopback recording. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
startEchoTest | Starts an audio call test. |
stopEchoTest | Stops the audio call test. |
enableLastmileTest | Enables the network connection quality test. |
disableLastmileTest | Disables the network connection quality test. |
startLastmileProbeTest | Starts the last-mile network probe test. |
stopLastmileProbeTest | Stops the last-mile network probe test. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
setExternalAudioSource | Configures the external audio source. |
pushAudioFrame | Pushes the external audio frame. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
setExternalAudioSink | Sets the external audio sink. |
pullAudioFrame | Pulls the external audio frame. |
This group of methods is applicable to Video Communication, and Video Broadcasting.
Method | Description |
---|---|
setExternalVideoSource | Configures the external video source. |
pushVideoFrame | Pushes the external video frame. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
registerAudioFrameObserver | Registers an audio frame observer object. |
setRecordingAudioFrameParameters | Sets the audio recording format for the onRecordAudioFrame callback. |
setPlaybackAudioFrameParameters | Sets the audio playback format for the onPlaybackAudioFrame callback. |
setMixedAudioFrameParameters | Sets the mixed audio format for the onMixedAudioFrame callback. |
This group of methods is applicable to Video Communication and Video Broadcasting.
Method | Description |
---|---|
registerVideoFrameObserver | Registers a video frame observer object. |
This group of methods is applicable only to Video Broadcasting.
Method | Description |
---|---|
addVideoWatermark | Adds a watermark image to the local video stream. |
clearVideoWatermarks | Removes the added watermark image from the video stream. |
This group of methods is applicable only to Video Broadcasting.
Method | Description |
---|---|
setLocalPublishFallbackOption | Sets the fallback option for the published video stream under unreliable network conditions. |
setRemoteSubscribeFallbackOption | Sets the fallback option for the remote stream under unreliable network conditions. |
setRemoteUserPriority | Prioritizes of a remote user's stream. |
This group of methods is applicable to Video Communication and Video Broadcasting.
Method | Description |
---|---|
enableDualStreamMode | Sets the stream mode to single- (default) or dual-stream mode. (Live broadcast only.) |
setRemoteVideoStreamType | Sets the remote user’s video stream type received by the local user when the remote user sends dual streams. |
setRemoteDefaultVideoStreamType | Sets the default video-stream type for the video received by the local user when the remote user sends dual streams. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
setEncryptionSecret | Enables built-in encryption with an encryption password before joining a channel. |
setEncryptionMode | Sets the built-in encryption mode. |
registerPacketObserver | Registers a packet observer. |
This group of methods is applicable to Audio Broadcasting and Video Broadcasting.
Method | Description |
---|---|
addInjectStreamUrl | Adds an online media stream to a live broadcast. |
removeInjectStreamUrl | Removes the online media stream from a live broadcast. |
This group of methods is applicable to Audio Broadcasting and Video Broadcasting.
Method | Description |
---|---|
addPublishStreamUrl | Adds a CDN stream address. |
removePublishStreamUrl | Removes a CDN stream address. |
setLiveTranscoding | Sets the video layout and audio for CDN live. |
This group of methods is applicable to Video Communication and Video Broadcasting.
Method | Description |
---|---|
createDataStream | Creates a data stream. |
sendStreamMessage | Sends data stream messages. |
This group of methods is applicable to Video Communication and Video Broadcasting.
Method | Description |
---|---|
setLocalVideoMirrorMode | Sets the local video mirror mode. |
setCameraCapturerConfiguration | Sets the camera capture preference. |
This group of methods is applicable to Video Communication and Video Broadcasting.
Method | Description |
---|---|
startScreenCaptureByDisplayId | Shares the whole or part of a screen by specifying the display ID. |
startScreenCaptureByWindowId | Shares the whole or part of a window by specifying the window ID. |
startScreenCaptureByScreenRect | Shares the whole or part of a screen by specifying the screen rect. |
stopScreenCapture | Stops screen sharing. |
updateScreenCaptureRegion | Updates the screen capture region. |
setScreenCaptureContentHint | Sets the content hint for screen sharing. |
updateScreenCaptureParameters | Updates the screen sharing parameters. |
updateScreenCaptureRegion | Updates the screen sharing region. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
enumerateVideoDevices | Enumerates the video devices. |
startDeviceTest | Starts the video-capture device test. |
stopDeviceTest | Stops the video-capture device test. |
getCount | Retrieves the total number of indexed video devices in the system. |
getDevice | Retrieves the video-capture device that is in use |
setDevice | Sets the device with the device ID. |
enumeratePlaybackDevices | Enumerates the audio playback devices. |
enumerateRecordingDevices | Enumerates the audio recording devices. |
setPlaybackDevice | Sets the audio playback device using the device ID. |
setRecordingDevice | Sets the audio recording device using the device ID. |
startPlaybackDeviceTest | Starts the audio playback device test. |
stopPlaybackDeviceTest | Stops the audio playback device test. |
setPlaybackDeviceVolume | Sets the volume of the audio playback device. |
getPlaybackDeviceVolume | Retrieves the volume of the audio playback device. |
setRecordingDeviceVolume | Sets the volume of the microphone. |
getRecordingDeviceVolume | Retrieves the volume of the microphone. |
setPlaybackDeviceMute | Mutes the audio playback device. |
getPlaybackDeviceMute | Retrieves the mute state of the audio playback device. |
setRecordingDeviceMute | Mutes/Unmutes the microphone. |
getRecordingDeviceMute | Retrieves the microphone’s mute status. |
startRecordingDeviceTest | Starts the microphone test. |
stopRecordingDeviceTest | Stops the microphone test. |
startAudioDeviceLoopbackTest | Starts the audio device loopback test. |
stopAudioDeviceLoopbackTest | Stops the audio device loopback test. |
onVideoDeviceStateChanged | Occurs when the video device state changes. |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
getCallId | Retrieves the current call ID. |
rate | Allows the user to rate the call and is called after the call ends. |
complain | Allows a user to complain about the call quality after a call ends. |
getVersion | Retrieves the SDK version number. |
getErrorDescription | Retrieves the warning or error description. |
setLogFile | Specifies an SDK output log file. |
setLogFilter | Sets the output log level of the SDK. |
setLogFileSize | Sets the log file size (KB). |
This group of methods is applicable to Voice Communication, Video Communication, Audio Broadcasting, and Video Broadcasting.
Method | Description |
---|---|
setParameters | Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options. |
Callback | Description |
---|---|
onWarning | Reports a warning during SDK runtime. |
onError | Reports an error during SDK runtime. |
onJoinChannelSuccess | Occurs when a user joins a channel. |
onRejoinChannelSuccess | Occurs when a user rejoins the channel. |
onLeaveChannel | Occurs when a user leaves the channel. |
onClientRoleChanged | Occurs when the user role switches in a live broadcast. |
onUserJoined | Occurs when a remote user joins the channel. |
onUserOffline | Occurs when a remote user leaves the channel. |
onConnectionStateChanged | Occurs when the connection state of the SDK to the server changes. |
onConnectionLost | Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted. |
onApiCallExecuted | Occurs when a method is executed. |
onTokenPrivilegeWillExpire | Occurs when the token expires in 30 seconds. |
onRequestToken | Occurs when the token expires. |
Callback | Description |
---|---|
onAudioVolumeIndication | Reports which users are speaking and the speakers' volume. |
onActiveSpeaker | Reports which user is the loudest speaker. |
onFirstLocalAudioFrame | Occurs when the first local audio frame is sent. |
onFirstRemoteAudioFrame | Occurs when the first remote audio frame is received. |
onVideoStopped | Occurs when the video stops playing. |
onFirstLocalVideoFrame | Occurs when the first local video frame is sent. |
onFirstRemoteVideoDecoded | Occurs when the first video frame from a specific remote user is decoded. |
onFirstRemoteVideoFrame | Occurs when the first remote video frame is rendered. |
onUserMuteAudio | Occurs when a remote user's audio stream is muted/unmuted. |
onUserMuteVideo | Occurs when a remote user's video stream playback pauses/resumes. |
onUserEnableVideo | Occurs when a remote user enables/disables the video module. |
onUserEnableLocalVideo | Occurs when a remote user enables/disables the local video capture. |
onVideoSizeChanged | Occurs when the video size or rotation of a specified remote user changes. |
onRemoteVideoStateChanged | Occurs when the remote video stream state changes. |
Callback | Description |
---|---|
onLocalPublishFallbackToAudioOnly | Occurs:
|
onRemoteSubscribeFallbackToAudioOnly | Occurs:
|
Callback | Description |
---|---|
onAudioDeviceStateChanged | Occurs when the audio device state changes. |
onAudioDeviceVolumeChanged | Occurs when the volume of the playback, microphone, or application changes. |
onCameraReady | Occurs when camera turns on and is ready to capture video. |
onCameraFocusAreaChanged | Occurs when the camera focus area changes. |
Callback | Description |
---|---|
onRemoteAudioStats | Reports the statistics of the audio stream from each remote user/host. |
onRtcStats | Reports the statistics of the current call session. |
onLastmileQuality | Reports the last mile network quality of the local user before the user joins the channel. |
onLastmileProbeResult | Reports the last-mile network probe result. |
onNetworkQuality | Reports the network quality of each user. |
onLocalVideoStats | Reports the statistics of the local video streams. |
onRemoteVideoStats | Reports the statistics of the video stream from each remote user/host. |
onRemoteAudioTransportStats | Reports the transport-layer statistics of each remote audio stream. |
onRemoteVideoTransportStats | Reports the transport-layer statistics of each remote video stream. |
onLocalVideoStats | Reports the statistics of the local video streams. |
Callback | Description |
---|---|
onAudioMixingFinished | Occurs when the audio mixing file playback finishes. |
onRemoteAudioMixingBegin | Occurs when a remote user starts audio mixing. |
onRemoteAudioMixingEnd | Occurs when a remote user finishes audio mixing. |
onAudioEffectFinished | Occurs when the local audio effect playback finishes. |
onAudioMixingStateChanged | Occurs when the state of the local user's audio mixing file changes. |
Callback | Description |
---|---|
onStreamPublished | Occurs when a CDN live stream is published. |
onStreamUnpublished | Occurs when a CDN live stream is unpublished. (CDN live only.) |
onTranscodingUpdated | Occurs when the publisher's transcoding settings are updated. |
Callback | Description |
---|---|
onStreamInjectedStatus | Reports the status of the injected online media stream. |
Callback | Description |
---|---|
onStreamMessage | Occurs when the local user receives a remote data stream within five seconds. |
onStreamMessageError | Occurs when the local user fails to receive the remote data stream. |
Callback | Description |
---|---|
onRecordAudioFrame | Occurs when the recorded audio frame is received. |
onPlaybackAudioFrame | Occurs when the audio playback frame is received. |
onPlaybackAudioFrameBeforeMixing | Occurs when the audio playback frame of a specified user is received. |
onMixedAudioFrame | Occurs when the mixed recorded and playback audio frame is received. |
Callback | Description |
---|---|
onCaptureVideoFrame | Occurs when the camera captured image is received. |
onRenderVideoFrame | Processes the received image of the specified user (post-processing). |
Callback | Description |
---|---|
onMediaEngineLoadSuccess | Occurs when the media engine loads. |
onMediaEngineStartCallSuccess | Occurs when the media engine call starts. |