API Overview
Agora provides ensured quality of experience (QoE) for worldwide Internet-based voice and video communications through SD-RTN™.
Initialization related
Method / Callback | Description |
---|---|
CreateAgoraRtcEngine | Creates one IRtcEngine object. |
Initialize | Initializes IRtcEngine. |
Dispose | Releases the IRtcEngine instance. |
Channel related
Method / Callback | Description |
---|---|
SetChannelProfile | Sets the channel profile. |
JoinChannel [1/2] | Joins a channel. |
JoinChannel [2/2] | Joins a channel with media options. |
JoinChannelEx | Joins a channel. |
UpdateChannelMediaOptions | Updates the channel media options after joining the channel. |
UpdateChannelMediaOptionsEx | Updates the channel media options after joining the channel. |
LeaveChannel [1/2] | Leaves a channel. |
LeaveChannelEx [1/2] | Leaves a channel. |
LeaveChannel [2/2] | Sets channel options and leaves the channel. |
LeaveChannelEx [2/2] | Sets channel options and leaves the channel. |
PreloadChannel | Preloads a channel with token, channelId, and uid. |
PreloadChannelWithUserAccount | Preloads a channel with token, channelId, and userAccount. |
UpdatePreloadChannelToken | Updates the wildcard token for preloading channels. |
RenewToken | Renews the token. |
SetClientRole [1/2] | Sets the client role. |
SetClientRole [2/2] | Set the user role and the audience latency level in a live streaming scenario. |
OnJoinChannelSuccess | Occurs when a user joins a channel. |
OnRejoinChannelSuccess | Occurs when a user rejoins the channel. |
OnClientRoleChanged | Occurs when the user role or the audience latency level changes. |
OnClientRoleChangeFailed | Occurs when switching a user role fails. |
OnLeaveChannel | Occurs when a user leaves a channel. |
OnUserJoined | Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) joins the channel. |
OnUserOffline | Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel. |
OnNetworkTypeChanged | Occurs when the local network type changes. |
OnUplinkNetworkInfoUpdated | Occurs when the uplink network information changes. |
OnConnectionLost | Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted. |
OnConnectionStateChanged | Occurs when the network connection state changes. |
OnRequestToken | Occurs when the token expires. |
OnTokenPrivilegeWillExpire | Occurs when the token expires in 30 seconds. |
OnError | Reports an error during SDK runtime. |
Publish and subscription
Method / Callback | Description |
---|---|
MuteLocalAudioStream | Stops or resumes publishing the local audio stream. |
MuteLocalAudioStreamEx | Stops or resumes publishing the local audio stream. |
MuteRemoteAudioStream | Stops or resumes subscribing to the audio stream of a specified user. |
MuteRemoteAudioStreamEx | Stops or resumes receiving the audio stream of a specified user. |
MuteAllRemoteAudioStreams | Stops or resumes subscribing to the audio streams of all remote users. |
MuteAllRemoteAudioStreamsEx | Stops or resumes subscribing to the audio streams of all remote users. |
MuteLocalVideoStream | Stops or resumes publishing the local video stream. |
MuteLocalVideoStreamEx | Stops or resumes publishing the local video stream. |
MuteRemoteVideoStream | Stops or resumes subscribing to the video stream of a specified user. |
MuteRemoteVideoStreamEx | Stops or resumes receiving the video stream of a specified user. |
MuteAllRemoteVideoStreams | Stops or resumes subscribing to the video streams of all remote users. |
MuteAllRemoteVideoStreamsEx | Stops or resumes subscribing to the video streams of all remote users. |
SetRemoteVideoSubscriptionOptions | Options for subscribing to remote video streams. |
SetRemoteVideoSubscriptionOptionsEx | Options for subscribing to remote video streams. |
SetSubscribeAudioBlocklist | Set the blocklist of subscriptions for audio streams. |
SetSubscribeAudioBlocklistEx | Set the blocklist of subscriptions for audio streams. |
SetSubscribeAudioAllowlist | Sets the allowlist of subscriptions for audio streams. |
SetSubscribeAudioAllowlistEx | Sets the allowlist of subscriptions for audio streams. |
SetSubscribeVideoBlocklist | Set the blocklist of subscriptions for video streams. |
SetSubscribeVideoBlocklistEx | Set the blocklist of subscriptions for video streams. |
SetSubscribeVideoAllowlist | Set the allowlist of subscriptions for video streams. |
SetSubscribeVideoAllowlistEx | Set the allowlist of subscriptions for video streams. |
OnAudioPublishStateChanged | Occurs when the audio publishing state changes. |
OnAudioSubscribeStateChanged | Occurs when the audio subscribing state changes. |
OnVideoSubscribeStateChanged | Occurs when the video subscribing state changes. |
Audio basic functions
Method / Callback | Description |
---|---|
AdjustUserPlaybackSignalVolume | Adjusts the playback signal volume of a specified remote user. |
AdjustUserPlaybackSignalVolumeEx | Adjusts the playback signal volume of a specified remote user. |
AdjustPlaybackSignalVolume | Adjusts the playback signal volume of all remote users. |
EnableAudio | Enables the audio module. |
DisableAudio | Disables the audio module. |
EnableAudioVolumeIndication | Enables the reporting of users' volume indication. |
EnableAudioVolumeIndicationEx | Enables the reporting of users' volume indication. |
SetAudioProfile [2/2] | Sets audio profiles. |
SetAudioScenario | Sets audio scenarios. |
SetAudioSessionOperationRestriction | Sets the operational permission of the SDK on the audio session. |
OnAudioVolumeIndication | Reports the volume information of users. |
OnActiveSpeaker | Occurs when the most active remote speaker is detected. |
OnLocalAudioStateChanged | Occurs when the local audio stream state changes. |
OnFirstLocalAudioFramePublished | Occurs when the first audio frame is published. |
OnFirstRemoteAudioFrame | Occurs when the SDK receives the first audio frame from a specific remote user. |
OnUserMuteAudio | Occurs when a remote user (in the communication profile) or a host (in the live streaming profile) stops/resumes sending the audio stream. |
OnRemoteAudioStateChanged | Occurs when the remote audio state changes. |
OnLocalAudioStats | Reports the statistics of the local audio stream. |
OnRemoteAudioStats | Reports the transport-layer statistics of each remote audio stream. |
Audio capture
Method / Callback | Description |
---|---|
EnableLocalAudio | Enables or disables the local audio capture. |
EnableLoopbackRecording | Enables loopback audio capturing. |
EnableLoopbackRecordingEx | Enables loopback audio capturing. |
AdjustRecordingSignalVolume | Adjusts the capturing signal volume. |
AdjustLoopbackSignalVolume | Adjusts the volume of the signal captured by the sound card. |
MuteRecordingSignal | Whether to mute the recording signal. |
EnableInEarMonitoring | Enables in-ear monitoring. |
SetInEarMonitoringVolume | Sets the volume of the in-ear monitor. |
Audio pre-processing and post-processing
Method / Callback | Description |
---|---|
EnableVoiceAITuner | Enables or disables the voice AI tuner. |
SetAdvancedAudioOptions | Sets audio advanced options. |
SetAINSMode | Sets whether to enable the AI noise suppression function and set the noise suppression mode. |
SetLocalVoiceEqualization | Sets the local voice equalization effect. |
SetLocalVoicePitch | Changes the voice pitch of the local speaker. |
SetLocalVoiceReverb | Sets the local voice reverberation. |
SetVoiceBeautifierPreset | Sets a preset voice beautifier effect. |
SetVoiceBeautifierParameters | Sets parameters for the preset voice beautifier effects. |
SetAudioEffectPreset | Sets an SDK preset audio effect. |
SetAudioEffectParameters | Sets parameters for SDK preset audio effects. |
SetVoiceConversionPreset | Sets a preset voice beautifier effect. |
SetLocalVoiceFormant | Set the formant ratio to change the timbre of human voice. |
EnableSoundPositionIndication | Enables or disables stereo panning for remote users. |
SetRemoteVoicePosition | Sets the 2D position (the position on the horizontal plane) of the remote user's voice. |
SetRemoteVoicePositionEx | Sets the 2D position (the position on the horizontal plane) of the remote user's voice. |
GetLocalSpatialAudioEngine | Gets one ILocalSpatialAudioEngine object. |
Initialize | Initializes ILocalSpatialAudioEngine. |
Dispose | Destroys ILocalSpatialAudioEngine. |
UpdateSelfPosition | Updates the spatial position of the local user. |
UpdateRemotePosition | Updates the spatial position of the specified remote user. |
RemoveRemotePosition | Removes the spatial position of the specified remote user. |
ClearRemotePositions | Removes the spatial positions of all remote users. |
SetHeadphoneEQParameters | Sets the low- and high-frequency parameters of the headphone equalizer. |
SetHeadphoneEQPreset | Sets the preset headphone equalization effect. |
Raw audio data
Method / Callback | Description |
---|---|
RegisterAudioFrameObserver | Registers an audio frame observer object. |
UnRegisterAudioFrameObserver | Unregisters an audio frame observer. |
SetEarMonitoringAudioFrameParameters | Sets the format of the in-ear monitoring raw audio data. |
SetRecordingAudioFrameParameters | Sets the format of the captured raw audio data. |
SetPlaybackAudioFrameParameters | Sets the format of the raw audio playback data. |
SetMixedAudioFrameParameters | Set the format of the raw audio data after mixing for audio capture and playback. |
SetPlaybackAudioFrameBeforeMixingParameters | Sets the format of the raw audio playback data before mixing. |
OnEarMonitoringAudioFrame | Gets the in-ear monitoring audio frame. |
OnRecordAudioFrame | Gets the captured audio frame. |
OnPlaybackAudioFrame | Gets the raw audio frame for playback. |
OnPlaybackAudioFrameBeforeMixing | Retrieves the audio frame before mixing of subscribed remote users. |
OnMixedAudioFrame | Retrieves the mixed captured and playback audio frame. |
Encoded audio data
Method / Callback | Description |
---|---|
RegisterAudioEncodedFrameObserver | Registers an encoded audio observer. |
UnRegisterAudioEncodedFrameObserver | Unregisters the encoded audio frame observer. |
OnRecordAudioEncodedFrame | Gets the encoded audio data of the local user. |
OnPlaybackAudioEncodedFrame | Gets the encoded audio data of all remote users. |
OnMixedAudioEncodedFrame | Gets the mixed and encoded audio data of the local and all remote users. |
Custom audio capture and renderer
Method / Callback | Description |
---|---|
CreateCustomAudioTrack | Creates a custom audio track. |
DestroyCustomAudioTrack | Destroys the specified audio track. |
SetExternalAudioSink | Sets the external audio sink. |
PullAudioFrame | Pulls the remote audio data. |
PushAudioFrame | Pushes the external audio frame. |
AdjustCustomAudioPlayoutVolume | Adjusts the volume of the custom audio track played locally. |
AdjustCustomAudioPublishVolume | Adjusts the volume of the custom audio track played remotely. |
EnableCustomAudioLocalPlayback | Sets whether to enable the local playback of external audio source. |
Audio spectrum
Method / Callback | Description |
---|---|
RegisterAudioSpectrumObserver | Register an audio spectrum observer. |
EnableAudioSpectrumMonitor | Turns on audio spectrum monitoring. |
DisableAudioSpectrumMonitor | Disables audio spectrum monitoring. |
UnregisterAudioSpectrumObserver | Unregisters the audio spectrum observer. |
OnLocalAudioSpectrum | Gets the statistics of a local audio spectrum. |
OnRemoteAudioSpectrum | Gets the remote audio spectrum. |
Video basic functions
Method / Callback | Description |
---|---|
EnableVideo | Enables the video module. |
DisableVideo | Disables the video module. |
SetVideoScenario | Sets video application scenarios. |
SetVideoEncoderConfiguration | Sets the video encoder configuration. |
SetVideoEncoderConfigurationEx | Sets the video encoder configuration. |
StartPreview [1/2] | Enables the local video preview. |
StopPreview [1/2] | Stops the local video preview. |
StartPreview [2/2] | Enables the local video preview and specifies the video source for the preview. |
StopPreview [2/2] | Stops the local video preview. |
OnLocalVideoStateChanged | Occurs when the local video stream state changes. |
OnLocalVideoStats | Reports the statistics of the local video stream. |
OnFirstLocalVideoFramePublished | Occurs when the first video frame is published. |
OnVideoPublishStateChanged | Occurs when the video publishing state changes. |
OnVideoSizeChanged | Occurs when the video size or rotation of a specified user changes. |
OnRemoteVideoStateChanged | Occurs when the remote video stream state changes. |
OnRemoteVideoStats | Reports the statistics of the video stream sent by each remote users. |
OnFirstLocalVideoFrame | Occurs when the first local video frame is displayed on the local video view. |
OnFirstRemoteVideoFrame | Occurs when the renderer receives the first frame of the remote video. |
OnFirstRemoteVideoDecoded | Occurs when the first remote video frame is received and decoded. |
OnUserMuteVideo | Occurs when a remote user stops or resumes publishing the video stream. |
OnUserEnableVideo | Occurs when a remote user enables or disables the video module. |
Video capture
Method / Callback | Description |
---|---|
EnableLocalVideo | Enables/Disables the local video capture. |
StartCameraCapture | Starts camera capture. |
StopCameraCapture | Stops camera capture. |
SetCameraStabilizationMode | Set the camera stabilization mode.(For iOS only) |
Video pre-processing and post-processing
Method / Callback | Description |
---|---|
SetLocalVideoDataSourcePosition | |
TakeSnapshot | Takes a snapshot of a video stream. |
TakeSnapshotEx | Takes a snapshot of a video stream using connection ID. |
EnableVirtualBackground | Enables/Disables the virtual background. |
EnableVideoImageSource | Sets whether to replace the current video feeds with images when publishing video streams. |
SetBeautyEffectOptions | Sets the image enhancement options. |
SetColorEnhanceOptions | Sets color enhancement. |
SetLowlightEnhanceOptions | Sets low-light enhancement. |
SetVideoDenoiserOptions | Sets video noise reduction. |
EnableFaceDetection | Enables or disables face detection for the local user. |
OnFacePositionChanged | Reports the face detection result of the local user. |
IsCameraCenterStageSupported | Check if the camera supports portrait center stage. (For iOS and macOS only) |
EnableCameraCenterStage | Enables or disables portrait center stage. (For iOS and macOS only) |
OnSnapshotTaken | Reports the result of taking a video snapshot. |
AddVideoWatermark [1/2] | Adds a watermark image to the local video. |
AddVideoWatermark [2/2] | Adds a watermark image to the local video. |
AddVideoWatermarkEx | Adds a watermark image to the local video. |
ClearVideoWatermarks | Removes the watermark image from the video stream. |
ClearVideoWatermarkEx | Removes the watermark image from the video stream. |
RegisterFaceInfoObserver | Registers a facial information observer. |
UnregisterFaceInfoObserver | Unregisters a facial information observer. |
OnFaceInfo | Occurs when the facial information processed by speech driven extension is received. |
Video encoding
Method / Callback | Description |
---|---|
SetRemoteVideoStreamType | Sets the video stream type to subscribe to. |
SetRemoteVideoStreamTypeEx | Sets the video stream type to subscribe to. |
SetRemoteDefaultVideoStreamType | Sets the default video stream type to subscribe to. |
SetDualStreamMode [1/2] | Sets the dual-stream mode on the sender side. |
SetDualStreamMode [2/2] | Sets dual-stream mode configuration on the sender side. |
SetDualStreamModeEx | Sets the dual-stream mode on the sender side. |
StartLocalVideoTranscoder | Starts the local video mixing. |
StopLocalVideoTranscoder | Stops the local video mixing. |
UpdateLocalTranscoderConfiguration | Updates the local video mixing configuration. |
OnLocalVideoTranscoderError | Occurs when there's an error during the local video mixing. |
Video rendering
Method / Callback | Description |
---|---|
SetRenderMode | Sets the render mode of the media player. |
SetLocalRenderMode [2/2] | Updates the display mode of the local video view. |
SetRemoteRenderMode | Updates the display mode of the video view of a remote user. |
SetRemoteRenderModeEx | Sets the video display mode of a specified remote user. |
SetView | Sets the view. |
SetForUser | Sets the local or remote video display. |
SetupRemoteVideoEx | Initializes the video view of a remote user. |
EnableInstantMediaRendering | Enables audio and video frame instant rendering. |
StartMediaRenderingTracing | Enables tracing the video frame rendering process. |
StartMediaRenderingTracingEx | Enables tracing the video frame rendering process. |
OnTextureSizeModify | This callback is triggered when the width and height of Texture are changed. |
OnTranscodedStreamLayoutInfo | Occurs when the local user receives a mixed video stream carrying layout information. |
OnVideoRenderingTracingResult | Video frame rendering event callback. |
Raw video data
Method / Callback | Description |
---|---|
RegisterVideoFrameObserver | Registers a raw video frame observer object. |
OnCaptureVideoFrame | Occurs each time the SDK receives a video frame captured by local devices. |
OnPreEncodeVideoFrame | Occurs each time the SDK receives a video frame before encoding. |
OnRenderVideoFrame | Occurs each time the SDK receives a video frame sent by the remote user. |
Encoded video data
Method / Callback | Description |
---|---|
RegisterVideoEncodedFrameObserver | Registers a receiver object for the encoded video image. |
UnregisterVideoEncodedFrameObserver | Unregisters a receiver object for the encoded video frame. |
OnEncodedVideoFrameReceived | Reports that the receiver has received the to-be-decoded video frame sent by the remote end. |
Custom Video Source and Renderer
Method / Callback | Description |
---|---|
CreateCustomVideoTrack | Creates a custom video track. |
DestroyCustomVideoTrack | Destroys the specified video track. |
SetExternalVideoSource | Configures the external video source. |
PushVideoFrame | Pushes the external raw video frame to the SDK through video tracks. |
Music file playback
Method / Callback | Description |
---|---|
StartAudioMixing [1/2] | Starts playing the music file. |
StartAudioMixing [2/2] | Starts playing the music file. |
StopAudioMixing | Stops playing 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 publishing. |
GetAudioMixingPlayoutVolume | Retrieves the audio mixing volume for local playback. |
GetAudioMixingPublishVolume | Retrieves the audio mixing volume for publishing. |
SetAudioMixingPlaybackSpeed | Sets the playback speed of the current audio file. |
GetAudioMixingDuration | Retrieves the duration (ms) of the music file. |
GetAudioMixingCurrentPosition | Retrieves the playback position (ms) of the music file. |
SetAudioMixingPitch | Sets the pitch of the local music file. |
SetAudioMixingPosition | Sets the audio mixing position. |
SetAudioMixingDualMonoMode | Sets the channel mode of the current audio file. |
GetAudioTrackCount | Gets the index of audio tracks of the current music file. |
SelectAudioTrack [1/2] | Selects the audio track used during playback. |
SelectMultiAudioTrack | Selects the audio tracks that you want to play on your local device and publish to the channel respectively. |
OnAudioMixingStateChanged | Occurs when the playback state of the music file changes. |
OnAudioMixingPositionChanged | Reports the playback progress of a music file. |
Audio effect file playback
Method / Callback | Description |
---|---|
GetEffectsVolume | Retrieves the volume of the audio effects. |
SetEffectsVolume | Sets the volume of the audio effects. |
GetVolumeOfEffect | Gets the volume of a specified audio effect file. |
SetVolumeOfEffect | Gets the volume of a specified audio effect file. |
PreloadEffect | Preloads a specified audio effect file into the memory. |
PlayEffect | Plays the specified local or online audio effect file. |
PlayAllEffects | Plays all audio effect files. |
PauseEffect | Pauses a specified audio effect file. |
PauseAllEffects | Pauses all audio effects. |
ResumeEffect | Resumes playing a specified audio effect. |
ResumeAllEffects | Resumes playing all audio effect files. |
StopEffect | Stops playing a specified audio effect. |
StopAllEffects | Stops playing all audio effects. |
UnloadEffect | Releases a specified preloaded audio effect from the memory. |
UnloadAllEffects | Releases a specified preloaded audio effect from the memory. |
GetEffectDuration | Retrieves the duration of the audio effect file. |
GetEffectCurrentPosition | Retrieves the playback position of the audio effect file. |
SetEffectPosition | Sets the playback position of an audio effect file. |
OnAudioEffectFinished | Occurs when the playback of the local music file finishes. |
Virtual metronome
Method / Callback | Description |
---|---|
StartRhythmPlayer | Enables the virtual metronome. |
StopRhythmPlayer | Disables the virtual metronome. |
ConfigRhythmPlayer | Configures the virtual metronome. |
OnRhythmPlayerStateChanged | Occurs when the state of virtual metronome changes. |
Media player
For more methods about the media player, see IMediaPlayer.
Method / Callback | Description |
---|---|
CreateMediaPlayer | Creates a media player object. |
GetMediaPlayerCacheManager | Gets one IMediaPlayerCacheManager instance. |
Dispose | Releases all the resources occupied by the media player. |
IMediaPlayer | This class provides media player functions and supports multiple instances. |
IMediaPlayerCacheManager | This class provides methods to manage cached media files. |
IMediaPlayerSourceObserver | Provides callbacks for media players. |
Media player cache
Method / Callback | Description |
---|---|
EnableAutoRemoveCache | Sets whether to delete cached media files automatically. |
RemoveAllCaches | Deletes all cached media files in the media player. |
RemoveCacheByUri | Deletes a cached media file. |
RemoveOldCache | Deletes a cached media file that is the least recently used. |
SetCacheDir | Sets the storage path for the media files that you want to cache. |
SetMaxCacheFileCount | Sets the maximum number of media files that can be cached. |
SetMaxCacheFileSize | Sets the maximum size of the aggregate storage space for cached media files. |
GetCacheDir | Gets the storage path of the cached media files. |
GetCacheFileCount | Gets the number of media files that are cached. |
GetMaxCacheFileCount | Gets the maximum number of media files that can be cached. |
GetMaxCacheFileSize | Gets the maximum size of the aggregate storage space for cached media files. |
OnPlayerCacheStats | Reports the statistics of the media file being cached. |
Channel media stream relay
Method / Callback | Description |
---|---|
StartOrUpdateChannelMediaRelay | Starts relaying media streams across channels or updates channels for media relay. |
StartOrUpdateChannelMediaRelayEx | Starts relaying media streams across channels or updates channels for media relay. |
StopChannelMediaRelay | Stops the media stream relay. Once the relay stops, the host quits all the target channels. |
StopChannelMediaRelayEx | Stops the media stream relay. Once the relay stops, the host quits all the target channels. |
PauseAllChannelMediaRelay | Pauses the media stream relay to all target channels. |
PauseAllChannelMediaRelayEx | Pauses the media stream relay to all target channels. |
ResumeAllChannelMediaRelay | Resumes the media stream relay to all target channels. |
ResumeAllChannelMediaRelayEx | Resumes the media stream relay to all target channels. |
OnChannelMediaRelayStateChanged | Occurs when the state of the media stream relay changes. |
Media push
Method / Callback | Description |
---|---|
StartRtmpStreamWithoutTranscoding | Starts pushing media streams to a CDN without transcoding. |
StartRtmpStreamWithoutTranscodingEx | Starts pushing media streams to a CDN without transcoding. |
StartRtmpStreamWithTranscoding | Starts Media Push and sets the transcoding configuration. |
StartRtmpStreamWithTranscodingEx | Starts Media Push and sets the transcoding configuration. |
UpdateRtmpTranscoding | Updates the transcoding configuration. |
UpdateRtmpTranscodingEx | Updates the transcoding configuration. |
StopRtmpStream | Stops pushing media streams to a CDN. |
StopRtmpStreamEx | Stops pushing media streams to a CDN. |
OnRtmpStreamingEvent | Reports events during the Media Push. |
OnRtmpStreamingStateChanged | Occurs when the state of Media Push changes. |
OnTranscodingUpdated | Occurs when the publisher's transcoding is updated. |
Pushing streams to a CDN directly
Method / Callback | Description |
---|---|
StartDirectCdnStreaming | Starts pushing media streams to the CDN directly. |
StopDirectCdnStreaming | Stops pushing media streams to the CDN directly. |
SetDirectCdnStreamingAudioConfiguration | Sets the audio profile of the audio streams directly pushed to the CDN by the host. |
SetDirectCdnStreamingVideoConfiguration | Sets the video profile of the media streams directly pushed to the CDN by the host. |
OnDirectCdnStreamingStateChanged | Occurs when the CDN streaming state changes. |
OnDirectCdnStreamingStats | Reports the CDN streaming statistics. |
Data stream
Method / Callback | Description |
---|---|
CreateDataStream [1/2] | Creates a data stream. |
CreateDataStream [2/2] | Creates a data stream. |
CreateDataStreamEx [2/2] | Creates a data stream. |
SendStreamMessage | Sends data stream messages. |
OnStreamMessage | Occurs when the local user receives the data stream from the remote user. |
OnStreamMessageError | Occurs when the local user does not receive the data stream from the remote user. |
Metadata (SEI)
Method / Callback | Description |
---|---|
RegisterMediaMetadataObserver | Registers the metadata observer. |
UnregisterMediaMetadataObserver | Unregisters the specified metadata observer. |
SetMaxMetadataSize | Sets the maximum size of the media metadata. |
SendMetadata | Sends media metadata. |
OnMetaData | Occurs when the media metadata is received. |
OnMetadataReceived | Occurs when the local user receives the metadata. |
Audio route
Method / Callback | Description |
---|---|
SetDefaultAudioRouteToSpeakerphone | Sets the default audio playback route. |
SetEnableSpeakerphone | Enables/Disables the audio route to the speakerphone. |
SetRouteInCommunicationMode | Selects the audio playback route in communication audio mode. |
OnAudioRoutingChanged | Occurs when the local audio route changes. |
Video Device Management
Method / Callback | Description |
---|---|
EnableMultiCamera | Enables or disables multi-camera capture.(For iOS only) |
SwitchCamera | Switches between front and rear cameras.(For Android and iOS only) |
SetCameraCapturerConfiguration | Sets the camera capture configuration. |
IsCameraZoomSupported | Checks whether the device supports camera zoom.(For Android and iOS only) |
GetCameraMaxZoomFactor | Gets the maximum zoom ratio supported by the camera.(For Android and iOS only) |
SetCameraZoomFactor | Sets the camera zoom factor.(For Android and iOS only) |
IsCameraTorchSupported | Checks whether the device supports camera flash.(For Android and iOS only) |
SetCameraTorchOn | Enables the camera flash.(For Android and iOS only) |
IsCameraFaceDetectSupported | Checks whether the device camera supports face detection.(For Android and iOS only) |
IsCameraFocusSupported | Check whether the device supports the manual focus function.(For Android and iOS only) |
IsCameraExposureSupported | Queries whether the current camera supports adjusting exposure value.(For Android and iOS only) |
SetCameraExposureFactor | Sets the camera exposure value.(For Android and iOS only) |
SetCameraFocusPositionInPreview | Sets the camera manual focus position.(For Android and iOS only) |
IsCameraAutoFocusFaceModeSupported | Checks whether the device supports the face auto-focus function.(For Android and iOS only) |
SetCameraAutoFocusFaceModeEnabled | Enables the camera auto-face focus function.(For Android and iOS only) |
IsCameraExposurePositionSupported | Checks whether the device supports manual exposure.(For Android and iOS only) |
IsCameraAutoExposureFaceModeSupported | Checks whether the device supports auto exposure.(For iOS only) |
SetCameraExposurePosition | Sets the camera exposure position.(For Android and iOS only) |
SetCameraAutoExposureFaceModeEnabled | Sets whether to enable auto exposure.(For iOS only) |
OnCameraFocusAreaChanged | Occurs when the camera focus area changes.(For Android and iOS only) |
OnCameraExposureAreaChanged | Occurs when the camera exposure area changes.(For Android and iOS only) |
QueryCameraFocalLengthCapability | Queries the focal length capability supported by the camera.(For Android and iOS only) |
QueryCodecCapability | Queries the video codec capabilities of the SDK. |
EnumerateVideoDevices | Enumerates the video devices. (For Windows and macOS only) |
SetDevice | Specifies the video capture device with the device ID. (For Windows and macOS only) |
GetDevice | Retrieves the current video capture device. (For Windows and macOS only) |
GetVideoDeviceManager | Gets the IVideoDeviceManager object to manage video devices. |
GetCapability | Gets the detailed video frame information of the video capture device in the specified video format. (For Windows and macOS only) |
NumberOfCapabilities | Gets the number of video formats supported by the specified video capture device. (For Windows and macOS only) |
SetCameraDeviceOrientation | Sets the rotation angle of the captured video. (For Windows only) |
OnVideoDeviceStateChanged | Occurs when the video device state changes. (For Windows and macOS only) |
Audio Device Management
Method / Callback | Description |
---|---|
StartPlaybackDeviceTest | Starts the audio playback device test. |
StopPlaybackDeviceTest | Stops the audio playback device test. |
StartRecordingDeviceTest | Starts the audio capturing device test. |
StopRecordingDeviceTest | Stops the audio capturing device test. |
EnumeratePlaybackDevices | Enumerates the audio playback devices. (For Windows and macOS only) |
EnumerateRecordingDevices | Enumerates the audio capture devices. (For Windows and macOS only) |
FollowSystemPlaybackDevice | Sets the audio playback device used by the SDK to follow the system default audio playback device. (For Windows and macOS only) |
FollowSystemRecordingDevice | Sets the audio recording device used by the SDK to follow the system default audio recording device. (For Windows and macOS only) |
GetAudioDeviceManager | Gets the IAudioDeviceManager object to manage audio devices. (For Windows only) |
GetPlaybackDefaultDevice [1/2] | Gets the default audio playback device. (For Windows and macOS only) |
GetPlaybackDefaultDevice [2/2] | Get the system‘s default audio playback device and its type.(For macOS only) |
GetRecordingDefaultDevice [1/2] | Gets the default audio capture device. (For Windows and macOS only) |
GetRecordingDefaultDevice [2/2] | Gets the default audio capture device and its type.(For macOS only) |
SetPlaybackDevice | Sets the audio playback device. (For Windows and macOS only) |
GetPlaybackDevice | Retrieves the audio playback device associated with the device ID. (For Windows and macOS only) |
GetPlaybackDeviceInfo [1/2] | Retrieves the information of the audio playback device. (For Windows and macOS only) |
GetPlaybackDeviceInfo [2/2] | Get the information and type of the audio playback device.(For macOS only) |
SetLoopbackDevice | Sets the loopback device. (For Windows and macOS only) |
GetLoopbackDevice | Gets the current loopback device. (For Windows and macOS only) |
FollowSystemLoopbackDevice | Sets whether the loopback device follows the system default playback device. (For Windows and macOS only) |
SetPlaybackDeviceVolume | Sets the volume of the audio playback device. (For Windows only) |
SetRecordingDevice | Sets the audio capture device. (For Windows and macOS only) |
GetRecordingDevice | Gets the current audio recording device. (For Windows and macOS only) |
GetRecordingDeviceInfo [1/2] | Retrieves the information of the audio recording device. (For Windows and macOS only) |
GetRecordingDeviceInfo [2/2] | Get the information and type of the audio capturing device.(For macOS only) |
SetRecordingDeviceVolume | Sets the volume of the audio capture device. (For Windows and macOS only) |
GetRecordingDeviceVolume | Retrieves the volume of the audio recording device. (For Windows only) |
SetPlaybackDeviceMute | Mutes the audio playback device. (For Windows only) |
GetPlaybackDeviceMute | Retrieves whether the audio playback device is muted. (For Windows only) |
StartAudioDeviceLoopbackTest | Starts an audio device loopback test. (For Windows and macOS only) |
StopAudioDeviceLoopbackTest | Stops the audio device loopback test. (For Windows and macOS only) |
OnAudioDeviceStateChanged | Occurs when the audio device state changes. (For Windows and macOS only) |
OnAudioDeviceVolumeChanged | Reports the volume change of the audio device or app. (For Windows and macOS only) |
GetAudioDeviceInfo | Gets the audio device information.(For Android only) |
Extension
Method / Callback | Description |
---|---|
LoadExtensionProvider | Loads an extension. |
RegisterExtension | Registers an extension. |
EnableExtension | Enables or disables extensions. |
GetExtensionProperty | Gets detailed information on the extensions. |
SetExtensionProperty | Sets the properties of the extension. |
SetExtensionProviderProperty | Sets the properties of the extension provider. |
OnExtensionStartedWithContext | Occurrs when the extension is enabled. |
OnExtensionStoppedWithContext | Occurs when the extension is disabled. |
OnExtensionEventWithContext | The event callback of the extension. |
Network and others
Method / Callback | Description |
---|---|
StartEchoTest | Starts an audio device loopback test. |
StopEchoTest | Stops the audio call test. |
StartLastmileProbeTest | Starts the last mile network probe test. |
StopLastmileProbeTest | Stops the last mile network probe test. |
OnLastmileQuality | Reports the last-mile network quality of the local user. |
OnLastmileProbeResult | Reports the last mile network probe result. |
GetCurrentMonotonicTimeInMs | Gets the current Monotonic Time of the SDK. |
QueryDeviceScore | Queries device score. |
SetCloudProxy | Sets up cloud proxy service. |
SetEnable | Sets whether to enable the video rendering. |
SetParameters [1/2] | Provides technical preview functionalities or special customizations by configuring the SDK with JSON options. |
GetCallId | Retrieves the call ID. |
GetCallIdEx | Gets the call ID with the connection ID. |
IsFeatureAvailableOnDevice | Checks whether the device supports the specified advanced feature. |
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. |
GetConnectionState | Gets the current connection state of the SDK. |
GetConnectionStateEx | Gets the current connection state of the SDK. |
GetVersion | Gets the SDK version. |
GetErrorDescription | Gets the warning or error description. |
GetNativeHandler | Gets the C++ handle of the Native SDK. |
GetNetworkType | Gets the type of the local network connection. |
GetNtpWallTimeInMs | Gets the current NTP (Network Time Protocol) time. |
EnableEncryption | Enables or disables the built-in encryption. |
EnableEncryptionEx | Enables or disables the built-in encryption. |
SendCustomReportMessage | Reports customized messages. |
SendCustomReportMessageEx | Agora supports reporting and analyzing customized messages. |
SetRemoteSubscribeFallbackOption | Sets the fallback option for the subscribed video stream based on the network conditions. |
OnRemoteSubscribeFallbackToAudioOnly | Occurs when the remote media stream falls back to the audio-only stream due to poor network conditions or switches back to the video stream after the network conditions improve. |
OnEncryptionError | Reports the built-in encryption errors. |
OnProxyConnected | Reports the proxy connection state. |
OnNetworkQuality | Reports the last mile network quality of each user in the channel. |
OnRtcStats | Reports the statistics about the current call. |
OnPermissionError | Occurs when the SDK cannot get the device permission. |