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.
Core methods for creating an RtcEngine instance and setting up a basic communication channel. This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
create | Creates an RtcEngine instance. |
destroy | Destroys the RtcEngine instance. |
setChannelProfile | Sets the channel profile. |
setClientRole | Sets the user role (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 app. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
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 capture. |
muteLocalAudioStream | Sends/Stops sending the local audio stream. |
muteRemoteAudioStream | Receives/Stops receiving a specified remote audio stream. |
muteAllRemoteAudioStreams | Receives/Stops receiving all remote audio streams. |
setDefaultMuteAllRemoteAudioStreams | Sets whether to receive all remote audio streams by default. |
This group of methods is applicable to Video Communication and Interactive Broadcast.
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 remote video display mode. |
CreateRendererView | Creates the video renderer view. |
startPreview | Starts the local video preview. |
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 remote video streams. |
setDefaultMuteAllRemoteVideoStreams | Sets whether to receive all remote video streams by default. |
Method | Description |
---|---|
setDefaultAudioRoutetoSpeaker | Sets the default audio playback route. |
setEnableSpeakerphone | Enables/Disables the audio playback route to the speakerphone. |
isSpeakerphoneEnabled | Checks whether the speakerphone is enabled. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
enableInEarMonitoring | Enables in-ear monitoring. |
setInEarMonitoringVolume | Sets the volume of the in-ear monitor. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
setLocalVoicePitch | Changes the voice pitch of the local speaker. |
setLocalVoiceEqualization | Sets the local voice equalization effect. |
setLocalVoiceReverb | Sets the local voice reverberation. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
startAudioMixing | Starts playing and mixing the music file. |
stopAudioMixing | Stops playing or mixing the music file. |
pauseAudioMixing | Pauses playing and mixing the music file. |
resumeAudioMixing | Resumes playing and mixing the music file. |
adjustAudioMixingVolume | Adjusts the volume of 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 | Gets the playback position (ms) of the music file. |
setAudioMixingPosition | Sets the playback starting position (ms) of the music file. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
getAudioEffectManager | Gets the IAudioEffectManager class to manage the audio effect files. |
getEffectsVolume | Gets the volume of the audio effects. |
setEffectsVolume | Sets the volume of the audio effects. |
setVolumeOfEffect | Sets the volume of a specified 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 preloaded 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, and Interactive Broadcast.
Method | Description |
---|---|
startAudioRecording | Starts an audio recording on the client. |
stopAudioRecording | Stops the audio recording on the client. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
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. |
This group of methods is applicable to Video Communication and Interactive Broadcast.
Method | Description |
---|---|
setVideoSource | Customizes the video source. |
setLocalVideoRenderer | Customizes the local video renderer. |
setRemoteVideoRenderer | Customizes the remote video renderer. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
setExternalAudioSource | Configures the external audio source. |
pushExternalAudioFrame | Pushes the external audio frame. |
This group of methods is applicable to Video Communication and Interactive Broadcast.
Method | Description |
---|---|
setExternalVideoSource | Configures the external video source. |
pushExternalVideoFrame | Pushes the external video frame. |
isTextureEncodeSupported | Checks if textured video frame is supported. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast. See Modify Raw Data.
Method | Description |
---|---|
registerAudioFrameObserver | Registers an audio frame observer object. |
setRecordingAudioFrameParameters | Sets the audio recording format for the onRecordFrame callback. |
setPlaybackAudioFrameParameters | Sets the audio playback format for the onPlaybackFrame callback. |
setMixedAudioFrameParameters | Sets the mixed audio format. |
This group of methods is applicable only to Interactive Broadcast.
Method | Description |
---|---|
addVideoWatermark | Adds a watermark image to the local video. |
clearVideoWatermark | Removes the added watermark image from the video stream. |
This group of methods is applicable only to Interactive Broadcast.
Method | Description |
---|---|
setLocalPublishFallbackOption | Sets the fallback option for the locally published video stream under unreliable network conditions. |
setRemoteSubscribeFallbackOption | Sets the fallback option for the remotely subscribed video stream under unreliable network conditions. |
This group of methods is applicable to Video Communication and Interactive Broadcast.
Method | Description |
---|---|
enableDualStreamMode | Enables/disables dual-stream mode. |
setRemoteVideoStreamType | Sets the video stream type of the remotely subscribed video stream. |
setRemoteDefaultVideoStreamType | Sets the default video stream type of the remotely subscribed video stream. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
setEncryptionSecret | Enables built-in encryption with an encryption password before joining a channel. |
setEncryptionMode | Sets the built-in encryption mode. |
This group of methods is applicable only to Interactive Broadcast.
Method | Description |
---|---|
addInjectStreamUrl | Injects an online media stream to a live broadcast. |
removeInjectStreamUrl | Removes the injected online media stream from a live broadcast. |
This group of methods is applicable only to Interactive Broadcast.
Method | Description |
---|---|
addPublishStreamUrl | Adds a CDN live stream URL address. |
removePublishStreamUrl | Removes a CDN live stream URL address. |
setLiveTranscoding | Sets the video layout and audio settings for CDN live. |
This group of methods is applicable to Video Communication and Interactive Broadcast.
Method | Description |
---|---|
createDataStream | Creates a data stream. |
sendStreamMessage | Sends data stream messages. |
This group of methods is applicable to Video Communication and Interactive Broadcast.
Method | Description |
---|---|
setVideoQualityParameters | Sets the preference option for the video quality (Live broadcast only). |
setLocalVideoMirrorMode | Sets the local video mirror mode. |
Method | Description |
---|---|
switchCamera | Switches between front and rear cameras. |
isCameraZoomSupported | Checks whether the camera zoom function is supported. |
isCameraTorchSupported | Checks whether the camera flash function is supported. |
isCameraFocusSupported | Checks whether the camera manual focus function is supported. |
isCameraExposurePositionSupported | Checks whether the camera exposure function is supported. |
isCameraAutoFocusFaceModeSupported | Checks whether the camera face auto-focus function is supported. |
setCameraZoomFactor | Sets the camera zoom ratio. |
getCameraMaxZoomFactor | Gets the maximum zoom ratio of the camera. |
setCameraFocusPositionInPreview | Sets the camera manual focus position. |
setCameraExposurePosition | Sets the camera exposure position. |
setCameraTorchOn | Enables the camera flash function. |
setCameraAutoFocusFaceModeEnabled | Enables the camera auto-face focus function. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
getCallId | Gets the current call ID. |
rate | Allows a user to rate a call after the call ends. |
complain | Allows a user to complain about the call quality after a call ends. |
getSdkVersion | Gets the SDK version number. |
getErrorDescription | Gets the warning or error description. |
setLogFile | Specifies an SDK output log file. |
setLogFilter | Sets the output log level of the SDK. |
getNativeHandle | Gets the native handle of the SDK engine. |
addHandler | Adds the IRtcEngineEventHandler class. |
This group of methods is applicable to Voice Communication, Video Communication, and Interactive Broadcast.
Method | Description |
---|---|
setParameters | Provides technical preview functionalities or special customizations by configuring the SDK with JSON options. |
getParameter | Gets the Agora SDK’s parameters for customization purposes. |
Callback | Description |
---|---|
onWarning | Occurs when a warning occurs. |
onError | Occurs when an error occurs. |
onJoinChannelSuccess | Occurs when a user joins a channel. |
onRejoinChannelSuccess | Occurs when a user rejoins a channel. |
onLeaveChannel | Occurs when a user leaves a channel. |
onClientRoleChanged | Occurs when the user role in a live broadcast changes. |
onUserJoined | Occurs when a remote user joins a channel. |
onUserOffline | Occurs when a remote user leaves a channel or goes offline. |
onConnectionStateChanged | Occurs when the network connection state changes. |
onConnectionLost | Occurs when the SDK loses connection to the server. |
onApiCallExecuted | Occurs when an API method is executed. |
onTokenPrivilegeWillExpire | Occurs when the token expires in 30 seconds. |
onRequestToken | Occurs when the token expires. |
Callback | Description |
---|---|
onMicrophoneEnabled | Occurs when the state of the microphone is changed. |
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 remote video frame 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 rotational information of a specified remote user changes. |
onRemoteVideoStateChanged | Occurs when the remote video stream state changes. |
Callback | Description |
---|---|
onLocalPublishFallbackToAudioOnly | Occurs when the locally published video stream falls back to audio only due to poor network conditions or switches back to the video stream after the network conditions improve. |
onRemoteSubscribeFallbackToAudioOnly | Occurs when the remotely subscribed video stream falls back to audio only due to poor network conditions or switches back to the video stream after the network conditions improve. |
Callback | Description |
---|---|
onAudioRouteChanged | Occurs when the local audio playback route changes. |
onCameraReady | Occurs when the camera turns on and is ready to capture video. |
onCameraFocusAreaChanged | Occurs when the camera focus area changes. |
onCameraExposureAreaChanged | Occurs when the camera exposure area changes. |
Callback | Description |
---|---|
onRemoteAudioStats | Reports the statistics of the audio stream from each remote user/host. |
onRtcStats | Reports the statistics of RtcEngine. |
onLastmileQuality | Reports the last mile network quality of the local user before the user joins a channel. |
onNetworkQuality | Reports the network quality of each user. |
onLocalVideoStats | Reports the statistics of the uploading local video stream. |
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. |
Callback | Description |
---|---|
onAudioMixingFinished | Occurs when the audio mixing file playback finishes. |
onAudioEffectFinished | Occurs when the audio effect file playback finishes. |
Callback | Description |
---|---|
onStreamPublished | Occurs when a CDN live stream is published. |
onStreamUnpublished | Occurs when CDN live streaming stops. |
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 |
---|---|
onRecordFrame | Occurs when the recorded audio frame is received. |
onPlaybackFrame | Occurs when the playback audio frame is received. |
Callback | Description |
---|---|
onMediaEngineLoadSuccess | Occurs when the media engine is loaded. |
onMediaEngineStartCallSuccess | Occurs when the media engine starts. |