API Overview

Agora provides a flexible combination of APIs deployed globally to deliver reliable real-time audio and video communication.

Initialization

API Description
createAgoraRtcEngine Creates a RtcEngine object.
initialize Initializes the RtcEngine.
registerEventHandler Adds the main callback event.
createAgoraRtcEngineEx Creates a RtcEngineEx object.
getMediaEngine Gets the MediaEngine object.
initialize Creates a MediaPlayerController.
release Destroys the RtcEngine object.
unregisterEventHandler Removes the specified callback event.

Channel Management

API Description
setChannelProfile Sets the channel profile.
joinChannel Sets media options and joins a channel.
joinChannelEx Joins a channel.
updateChannelMediaOptions Updates channel media options after joining the channel.
updateChannelMediaOptionsEx Updates channel media options after joining the channel.
leaveChannel Sets channel options and leaves the channel.
leaveChannelEx Sets channel options and leaves the channel.
preloadChannel Preloads a channel using token, channelId, and uid.
updatePreloadChannelToken Updates the wildcard token for the preloaded channel.
renewToken Updates the token.
setClientRole Sets the user role and audience latency level in live streaming.
onClientRoleChanged Callback when the user role or audience latency level is switched.
onClientRoleChangeFailed Callback when user role change fails.
onError Callback when an error occurs.
onJoinChannelSuccess Callback when successfully joined a channel.
onLeaveChannel Callback when leaving a channel.
onRejoinChannelSuccess Callback when successfully rejoined a channel.
onRenewTokenResult Callback for the result of the renewToken method call.
onRequestToken Callback when the token has expired.
onRtcStats Callback for current call statistics.
onTokenPrivilegeWillExpire Callback when the token is about to expire in 30 seconds.
onUserJoined Callback when a remote user (in communication) or host (in live streaming) joins the current channel.
onUserOffline Callback when a remote user (in communication) or host (in live streaming) leaves the current channel.

Publish and Subscribe

API Description
muteAllRemoteAudioStreams Stops or resumes subscribing to all remote users' audio streams.
muteAllRemoteAudioStreamsEx Stops or resumes subscribing to all remote users' audio streams.
muteAllRemoteVideoStreams Stops or resumes subscribing to all remote users' video streams.
muteAllRemoteVideoStreamsEx Stops or resumes subscribing to all remote users' video streams.
muteLocalAudioStream Stops or resumes publishing the local audio stream.
muteLocalAudioStreamEx Stops or resumes publishing the local audio stream.
muteLocalVideoStream Stops or resumes publishing the local video stream.
muteLocalVideoStreamEx Stops or resumes publishing the local video stream.
muteRemoteAudioStream Stops or resumes subscribing to the audio stream of a specified remote user.
muteRemoteAudioStreamEx Stops or resumes receiving a specified audio stream.
muteRemoteVideoStream Stops or resumes subscribing to the video stream of a specified remote user.
muteRemoteVideoStreamEx Stops or resumes receiving a specified video stream.
setDualStreamMode Sets the dual-stream mode on the sender and configures the low-quality video stream.
setDualStreamModeEx Sets the dual-stream mode on the sender side.
setRemoteDefaultVideoStreamType Sets the default video stream type to subscribe to.
setRemoteVideoStreamType Sets the video stream type to subscribe to.
setRemoteVideoStreamTypeEx Sets the video stream type to subscribe to.
setRemoteVideoSubscriptionOptions Sets the subscription options for the remote video stream.
setRemoteVideoSubscriptionOptionsEx Sets the subscription options for the remote video stream.
setSubscribeAudioAllowlist Sets the audio subscription allowlist.
setSubscribeAudioAllowlistEx Sets the audio subscription allowlist.
setSubscribeAudioBlocklist Sets the audio subscription blocklist.
setSubscribeAudioBlocklistEx Sets the audio subscription blocklist.
setSubscribeVideoAllowlist Sets the video subscription allowlist.
setSubscribeVideoAllowlistEx Sets the video subscription allowlist.
setSubscribeVideoBlocklist Sets the video subscription blocklist.
setSubscribeVideoBlocklistEx Sets the video subscription blocklist.
onAudioPublishStateChanged Callback for audio publish state changes.
onAudioSubscribeStateChanged Callback for audio subscription state changes.
onVideoSubscribeStateChanged Callback for video subscription state changes.

Audio Basic Features

API Description
adjustPlaybackSignalVolume Adjusts the signal volume of all remote users for local playback.
adjustUserPlaybackSignalVolume Adjusts the playback volume of a specified remote user locally.
adjustUserPlaybackSignalVolumeEx Adjusts the playback volume of a specified remote user locally.
disableAudio Disables the audio module.
enableAudio Enables the audio module.
enableAudioVolumeIndication Enables audio volume indication.
enableAudioVolumeIndicationEx Enables audio volume indication.
setAudioProfile Sets the audio encoding profile and audio scenario.
setAudioScenario Sets the audio scenario.
setAudioSessionOperationRestriction Sets the SDK's permission to operate the Audio Session.
onActiveSpeaker Callback when the most active remote speaker is detected.
onAudioVolumeIndication Callback for user audio volume indication.
onFirstLocalAudioFramePublished Callback when the first local audio frame is published.
onLocalAudioStateChanged Callback when the local audio state changes.
onLocalAudioStats Callback with statistics of the local audio stream during a call.
onRemoteAudioStateChanged Callback when the remote audio stream state changes.
onRemoteAudioStats Callback with statistics of the remote audio stream during a call.
onRemoteAudioTransportStats Reports the statistics of the remote audio stream transmission during a call.
onUserMuteAudio Occurs when a remote user (in communication) or host (in live streaming) stops or resumes sending audio stream.

Audio Capture

API Description
adjustLoopbackSignalVolume Adjusts the volume of the signal captured by the sound card.
adjustRecordingSignalVolume Adjusts the volume of the audio recording signal.
enableInEarMonitoring Enables in-ear monitoring.
enableLocalAudio Enables or disables local audio capture.
enableLoopbackRecording Enables sound card capture.
enableLoopbackRecordingEx Enables loopback recording.
muteRecordingSignal Mutes the recording signal.
setInEarMonitoringVolume Sets the in-ear monitoring volume.

Audio Effects

API Description
enableVoiceAITuner Enables or disables the AI tuner feature.
setAdvancedAudioOptions Sets advanced audio options.
setAINSMode Enables or disables AI noise reduction and sets the noise reduction mode.
setAudioEffectParameters Sets the parameters for SDK preset voice effects.
setAudioEffectPreset Sets the SDK preset voice effect.
setLocalVoiceEqualization Sets the local voice equalization.
setLocalVoiceFormant Sets the formant ratio to change the voice timbre.
setLocalVoicePitch Sets the local voice pitch.
setLocalVoiceReverb Sets the local voice reverb effect.
setVoiceBeautifierParameters Sets the parameters for the preset voice beautifier effect.
setVoiceBeautifierPreset Sets the preset voice beautifier effect.
setVoiceConversionPreset Sets the preset voice conversion effect.

Stereo

API Description
enableSoundPositionIndication Enables/disables stereo sound for remote users.
setRemoteVoicePosition Sets the 2D position of a remote user's voice on the horizontal plane.
setRemoteVoicePositionEx Sets the 2D position of a remote user's voice, i.e., horizontal position.

Spatial Audio

API Description
initialize Initializes the LocalSpatialAudioEngine.
clearRemotePositions Deletes the spatial position information of all remote users.
enableSpatialAudio Enables or disables spatial audio.
getLocalSpatialAudioEngine Gets the LocalSpatialAudioEngine object.
muteAllRemoteAudioStreams Stops or resumes subscribing to all remote users' audio streams.
muteLocalAudioStream Stops or resumes publishing the local audio stream.
muteRemoteAudioStream Stops or resumes subscribing to the audio stream of a specified remote user.
release Destroys the BaseSpatialAudioEngine.
removeRemotePosition Deletes the spatial position information of the specified remote user.
setAudioRecvRange Sets the audio receive range for the local user.
setDistanceUnit Sets the length (in meters) of one unit of distance in the game engine.
setHeadphoneEQParameters Sets the low-frequency and high-frequency parameters of the headphone equalizer.
setHeadphoneEQPreset Sets the preset headphone equalizer effect.
setMaxAudioRecvCount Sets the maximum number of audio streams that can be received within the audio reception range.
setPlayerAttenuation Sets the sound attenuation properties of the media player.
setRemoteAudioAttenuation Sets the sound attenuation effect for a specified user.
setRemoteUserSpatialAudioParams Sets the spatial audio parameters for a remote user.
setSpatialAudioParams Enables or disables spatial audio for the media player.
setZones Sets sound insulation zones.
updatePlayerPositionInfo Updates the spatial position of the media player.
updateRemotePosition Updates the spatial position information of a remote user.
updateSelfPosition Updates the local user's spatial position.

Audio Mixer

API Description
startLocalAudioMixer Starts local audio mixing.
stopLocalAudioMixer Stops local audio mixing.
updateLocalAudioMixerConfiguration Updates the configuration of local audio mixing.

Raw Audio Data

API Description
registerAudioFrameObserver Registers an audio observer object.
setEarMonitoringAudioFrameParameters Sets the data format for the onEarMonitoringAudioFrame callback.
setMixedAudioFrameParameters Sets the format of the raw audio data after audio mixing for capture and playback.
setPlaybackAudioFrameBeforeMixingParameters Sets the format of the raw audio playback data before mixing.
setPlaybackAudioFrameParameters Sets the format of the raw audio data for playback.
setRecordingAudioFrameParameters Sets the format of the raw audio data for capture.
unregisterAudioFrameObserver Unregisters the audio frame observer.
onEarMonitoringAudioFrame Receives the raw audio data for ear monitoring.
onMixedAudioFrame Retrieves the data after mixing recorded and playback audio.
onPlaybackAudioFrame Retrieves the raw audio data being played.
onPlaybackAudioFrameBeforeMixing Retrieves the audio of a subscribed remote user before mixing.
onRecordAudioFrame Retrieves the raw audio data collected.

Encoded Audio Data

API Description
registerAudioEncodedFrameObserver Registers the audio encoded frame observer.
unregisterAudioEncodedFrameObserver Unregisters the audio encoded frame observer.
onMixedAudioEncodedFrame Retrieves the encoded audio data after mixing local and all remote users' audio.
onPlaybackAudioEncodedFrame Retrieves the audio encoded data of all remote users.
onRecordAudioEncodedFrame Retrieves the audio encoded data of the local user.

Custom Audio Capture and Rendering

API Description
adjustCustomAudioPlayoutVolume Adjusts the local playback volume of a custom audio track.
adjustCustomAudioPublishVolume Adjusts the remote playback volume of a custom audio track.
createCustomAudioTrack Creates a custom audio track.
destroyCustomAudioTrack Destroys the specified audio track.
enableCustomAudioLocalPlayback Sets whether to play the external audio source locally.
pullAudioFrame Pulls remote audio data.
pushAudioFrame Pushes external audio frames.
setExternalAudioSink Sets external audio rendering.

Audio Spectrum

API Description
disableAudioSpectrumMonitor Disables audio spectrum monitoring.
enableAudioSpectrumMonitor Enables audio spectrum monitoring.
registerAudioSpectrumObserver Registers an audio spectrum observer.
unregisterAudioSpectrumObserver Unregisters the audio spectrum observer.
onLocalAudioSpectrum Gets the local audio spectrum.
onRemoteAudioSpectrum Gets the remote audio spectrum.

Video Basic Features

API Description
disableVideo Disables the video module.
enableLocalVideo Enables or disables local video capture.
enableVideo Enables the video module.
setVideoEncoderConfiguration Sets the video encoding attributes.
setVideoEncoderConfigurationEx Sets the video encoding attributes.
setVideoScenario Sets the video application scenario.
startPreviewWithoutSourceType Starts video preview.
startPreview Starts video preview and specifies the video source.
stopPreview Stops video preview.
onFirstLocalVideoFrame Callback when the first local video frame is displayed.
onFirstLocalVideoFramePublished Callback when the first local video frame is published.
onFirstRemoteVideoDecoded Callback when the first remote video is received and decoded.
onFirstRemoteVideoFrame Callback when the renderer receives the first remote video frame.
onLocalVideoEvent Callback triggered when a local video event occurs.
onLocalVideoStateChanged Callback when the local video state changes.
onLocalVideoStats Callback with local video stream statistics.
onRemoteVideoStateChanged Callback when the remote video state changes.
onRemoteVideoStats Callback for statistics of the remote video stream during a call.
onUserEnableVideo Callback when a remote user enables/disables the video module.
onUserMuteVideo Callback when a remote user stops or resumes publishing the video stream.
onVideoPublishStateChanged Callback for video publishing state change.
onVideoSizeChanged Callback when the size and rotation of local or remote video changes.

Camera Capture

API Description
setCameraStabilizationMode Sets the camera stabilization mode.
startCameraCapture Starts video capture using the camera.
stopCameraCapture Stops video capture using the camera.

Screen Capture

API Description
getScreenCaptureSources Gets the list of shareable screen and window objects.
queryScreenCaptureCapability Queries the maximum frame rate supported by the device during screen sharing.
setExternalMediaProjection Sets an external MediaProjection to capture screen video stream.
setScreenCaptureContentHint Sets the content type for screen sharing.
setScreenCaptureScenario Sets the screen sharing scenario.
startScreenCapture Starts screen capture.
startScreenCaptureBySourceType Starts screen capture and specifies the video source.
startScreenCaptureByDisplayId Starts capturing the video stream of the specified screen.
startScreenCaptureByWindowId Starts capturing the video stream of a specified window.
stopScreenCapture Stops screen capture.
stopScreenCaptureBySourceType Stops screen capture for the specified video source.
updateScreenCapture Updates the parameter configuration for screen capture.
updateScreenCaptureParameters Updates the parameter configuration for screen capture.
updateScreenCaptureRegion Updates the region for screen capture.

Snapshot

API Description
enableContentInspect Enables/disables local snapshot upload.
enableContentInspectEx Enables/disables local snapshot upload.
takeSnapshot Takes a snapshot of the video.
takeSnapshotWithConfig Takes a video snapshot at the specified observation point.
takeSnapshotEx Takes a video snapshot using the connection ID.
takeSnapshotWithConfigEx Takes a video snapshot at the specified observation point using the connection ID.
onSnapshotTaken Callback for video snapshot result.

Virtual Background

API Description
enableVirtualBackground Enables/disables virtual background.

Local Video Transcoding

API Description
startLocalVideoTranscoder Starts local video mixing.
stopLocalVideoTranscoder Stops local video mixing.
updateLocalTranscoderConfiguration Updates local video mixing configuration.
onLocalVideoTranscoderError Callback for local video mixing error.

Video Enhancement

API Description
addOrUpdateVideoEffect Adds or updates the effect for the specified video effect node and template.
createVideoEffectObject Creates an IVideoEffectObject video effect object.
destroyVideoEffectObject Destroys the video effect object.
getFaceShapeAreaOptions Gets face shaping area options.
getFaceShapeBeautyOptions Gets face shaping effect options.
getVideoEffectBoolParam Gets the boolean parameter from the video effect.
getVideoEffectFloatParam Gets the value of the specified float type parameter in a video effect.
getVideoEffectIntParam Gets the integer parameter from the video effect.
performVideoEffectAction Performs an action on the specified video effect node.
removeVideoEffect Removes the video effect for the specified node ID.
setBeautyEffectOptions Sets beauty effect options.
setColorEnhanceOptions Sets the color enhancement feature.
setFaceShapeAreaOptions Sets face shaping area options and specifies the media source.
setFaceShapeBeautyOptions Sets face shaping effect options and specifies the media source.
setFilterEffectOptions Sets filter effect options and specifies the media source.
setLowlightEnhanceOptions Sets the low-light enhancement feature.
setVideoDenoiserOptions Sets the video denoising feature.
setVideoEffectBoolParam Sets a boolean parameter for a video effect.
setVideoEffectFloatParam Sets a float parameter for a video effect.
setVideoEffectIntParam setVideoEffectIntParam: Sets an integer parameter for a video effect.

Face Detection

API Description
enableFaceDetection Enables/disables local face detection.
onFacePositionChanged Reports local face detection results.

Speech Driven

API Description
registerFaceInfoObserver Registers a face information observer.
unregisterFaceInfoObserver Unregisters the face information observer.
onFaceInfo Reports the face information processed by the voice driver plugin.

Center Stage

API Description
enableCameraCenterStage Enables or disables the Center Stage feature.
isCameraCenterStageSupported Checks whether the camera supports Center Stage.

Watermark

API Description
addVideoWatermarkWithConfig Adds a watermark image to the local video stream.
addVideoWatermarkWithConfigEx Adds a watermark image to the local video.
clearVideoWatermarkEx Removes added video watermarks.
clearVideoWatermarks Removes added video watermarks.
removeVideoWatermark Removes the watermark image from the local video.
removeVideoWatermarkEx Removes the specified watermark image from the local or remote video stream.

Image Source

API Description
enableVideoImageSource Enables or disables the placeholder image streaming feature.

Video Rendering

API Description
enableInstantMediaRendering Enables accelerated rendering of audio and video frames.
setLocalRenderMode Updates the local view display mode.
setLocalRenderTargetFps Sets the maximum frame rate for local video rendering.
setRemoteRenderMode Updates the display mode of the remote view.
setRemoteRenderModeEx Sets the display mode of the remote view.
setRemoteRenderTargetFps Sets the maximum frame rate for remote video rendering.
setRenderMode Sets the rendering mode of the player view.
setupLocalVideo Initializes the local view.
setupRemoteVideo Initializes the remote user view.
setupRemoteVideoEx Initializes the remote user view.
startMediaRenderingTracing Starts video frame rendering tracing.
startMediaRenderingTracingEx Starts video frame rendering tracing.
onTranscodedStreamLayoutInfo Callback for received mixed stream with layout information.
onVideoRenderingTracingResult Callback for video frame rendering events.

Raw Video Data

API Description
registerVideoFrameObserver Registers a raw video frame observer object.
unregisterVideoFrameObserver Unregisters the video frame observer.
onCaptureVideoFrame Gets the video data captured by the local device.
onFrame Callback when a video frame is received.
onPreEncodeVideoFrame Gets the video data before local encoding.
onRenderVideoFrame Gets the video data sent from the remote user.

Encoded Video Data

API Description
registerVideoEncodedFrameObserver Registers a video frame observer for encoded video images.
unregisterVideoEncodedFrameObserver Unregisters the video frame observer for encoded video frames.
onEncodedVideoFrameReceived Reports that the receiver has received a remote encoded video frame.

Custom Video Capture and Rendering

API Description
createCustomVideoTrack Creates a custom video track.
destroyCustomVideoTrack Destroys the specified video track.
isPipActivated Checks whether picture-in-picture mode is activated.
pipDispose Releases resources related to picture-in-picture.
pipIsAutoEnterSupported Checks whether automatic entry into picture-in-picture mode is supported.
pipIsSupported Checks whether the current device supports picture-in-picture mode.
pipSetup Configures picture-in-picture mode.
pipStart Starts picture-in-picture mode.
pipStop Stops picture-in-picture mode.
pushVideoFrame Publishes external raw video frames to the channel through a custom video track.
registerPipStateChangedObserver Registers a picture-in-picture state change observer.
dispose Releases resources related to picture-in-picture.
setExternalRemoteEglContext Sets the EGL context for rendering remote video streams.
setExternalVideoSource Sets the external video source.
unregisterPipStateChangedObserver Unregisters the picture-in-picture state change observer.
onPipStateChanged Callback for picture-in-picture state changes.

Audio Mixing

API Description
adjustAudioMixingPlayoutVolume Adjusts the local playback volume of the music file.
adjustAudioMixingPublishVolume Adjusts the remote playback volume of the music file.
adjustAudioMixingVolume Adjusts the playback volume of the music file.
getAudioMixingCurrentPosition Gets the playback progress of the music file.
getAudioMixingDuration Gets the total duration of the music file.
getAudioMixingPlayoutVolume Gets the local playback volume of the music file.
getAudioMixingPublishVolume Gets the remote playback volume of the music file.
getAudioTrackCount Gets the audio track index of the current music file.
pauseAudioMixing Pauses the playback of the music file.
resumeAudioMixing Resumes the playback of the music file.
selectAudioTrack Specifies the playback audio track of the current music file.
selectMultiAudioTrack Selects the audio tracks for local playback and remote publishing.
setAudioMixingDualMonoMode Sets the channel mode of the current audio file.
setAudioMixingPitch Adjusts the pitch of the locally played music file.
setAudioMixingPlaybackSpeed Sets the playback speed of the current music file.
setAudioMixingPosition Sets the playback position of the music file.
startAudioMixing Starts playing a music file.
stopAudioMixing Stops playing the music file.
onAudioMixingPositionChanged Reports the playback progress of the music file.
onAudioMixingStateChanged Occurs when the playback state of the music file changes.

Audio Effect Files

API Description
getEffectCurrentPosition Gets the playback progress of the specified sound effect file.
getEffectDuration Gets the total duration of the specified sound effect file.
getEffectsVolume Gets the playback volume of audio effect files.
getVolumeOfEffect Gets the playback volume of the specified audio effect file.
pauseAllEffects Pauses playback of all audio effect files.
pauseEffect Pauses playback of the audio effect file.
playAllEffects Plays all audio effect files.
playEffect Plays the specified local or online audio effect file.
playEffectEx Plays the specified audio effect in the channel.
preloadEffect Loads the audio effect file into memory.
preloadEffectEx Preloads the specified audio effect into the channel.
resumeAllEffects Resumes playback of all audio effect files.
resumeEffect Resumes playback of the specified audio effect file.
setEffectPosition Sets the playback position of the specified audio effect file.
setEffectsVolume Sets the playback volume of audio effect files.
setVolumeOfEffect Sets the playback volume of the specified audio effect file.
stopAllEffects Stops playback of all audio effect files.
stopEffect Stops playback of the specified audio effect file.
unloadAllEffects Releases all preloaded audio effect files from memory.
unloadEffect Releases a specific preloaded audio effect file from memory.
onAudioEffectFinished Callback when a local audio effect file finishes playing.

Rhythm Player

API Description
stopRhythmPlayer Stops the virtual metronome.

Media Player Initialization

API Description
createMediaPlayer Creates a media player object.
destroyMediaPlayer Destroys the media player.
getMediaPlayerCacheManager Gets the MediaPlayerCacheManager instance.

Media Resource Open

API Description
open Opens a media resource.
openWithMediaSource Opens a media resource and sets playback options.
preloadSrc Preloads a media resource.
switchSrc Switches the media resource.
unloadSrc Releases the preloaded media resource.

Media Resource Playback and Rendering

API Description
selectAudioTrack Specifies the audio track for the current audio file.
setAudioDualMonoMode Sets the channel mode of the current audio file.
setAudioPitch Adjusts the pitch of the currently playing media resource.
setLoopCount Sets loop playback.
setPlaybackSpeed Sets the playback speed of the current audio file.
setPlayerOptionInInt Sets media player options.
setPlayerOptionInString Sets media player options.
setView Sets the player rendering view.

Media Player Control

API Description
adjustPlayoutVolume Adjusts the local playback volume.
adjustPublishSignalVolume Adjusts the volume heard by remote users.
mute Sets whether to mute.
pause Pauses playback.
play Plays the media file.
playPreloadedSrc Plays a preloaded media resource.
resume Resumes playback after pausing.
seek Seeks to the specified playback position in the media file.
stop Stops playback.

Media Player Information

API Description
getAudioBufferDelay Gets the audio buffer delay when playing a media file.
getDuration Gets the total duration of the media file.
getMediaPlayerId Gets the player ID.
getMute Gets whether the currently playing media file is muted.
getPlayoutVolume Gets the current local playback volume.
getPlayPosition Gets the current playback position.
getPlaySrc Gets the path of the media resource being played.
getPublishSignalVolume Gets the volume heard by remote users.
getState Gets the current state of the player.
getStreamCount Gets the number of media streams in the current media file.
getStreamInfo Gets media stream information by stream index.
onPlayerPlaybackStats Reports information about the currently playing media resource.

Media Player Observer

API Description
registerAudioFrameObserver Registers an audio frame observer.
registerPlayerSourceObserver Registers a playback observer.
registerVideoFrameObserver Registers a video frame observer.
unregisterAudioFrameObserver Unregisters the audio frame observer.
unregisterPlayerSourceObserver Unregisters the playback observer.
unregisterVideoFrameObserver Unregisters the video frame observer.
onAudioVolumeIndication Callback for media player audio volume indication.
onFrame Callback for received audio frame.
onMetaData Reports retrieved media metadata.
onPlayBufferUpdated Reports the playable duration of buffered data.
onPlayerEvent Reports player events.
onPlayerInfoUpdated Callback when media player-related information changes.
onPlayerSourceStateChanged Reports changes in player state.
onPlayerSrcInfoChanged Callback for changes in video bitrate of media resource.
onPositionChanged Reports the current playback position of the media resource.
onPreloadEvent Reports events during media resource preloading.

Media Player Cache

API Description
enableAutoRemoveCache Enables or disables the automatic cache file removal feature.
getCacheDir Gets the storage path of the cached files.
getCacheFileCount Gets the total number of currently cached media files.
getMaxCacheFileCount Gets the maximum number of cache files set.
getMaxCacheFileSize Gets the maximum total cache size of cache files set.
removeAllCaches Deletes all cached media files in the media player.
removeCacheByUri Deletes a specified cached media file.
removeOldCache Deletes the least recently used cached media file in the media player.
setCacheDir Sets the storage path for media files to be cached.
setMaxCacheFileCount Sets the maximum number of cached media files.
setMaxCacheFileSize Sets the upper limit of the total cache size for media files.
onPlayerCacheStats Reports information about the media resources currently in cache.

Cross-Channel Media Relay

API Description
pauseAllChannelMediaRelay Pauses media stream relay to all destination channels.
pauseAllChannelMediaRelayEx Pauses media stream relay to all destination channels.
resumeAllChannelMediaRelay Resumes media stream relay to all destination channels.
resumeAllChannelMediaRelayEx Resumes media stream relay to all destination channels.
startOrUpdateChannelMediaRelay Starts or updates cross-channel media stream relay.
startOrUpdateChannelMediaRelayEx Starts or updates cross-channel media stream relay.
stopChannelMediaRelay Stops cross-channel media stream relay. Once stopped, the broadcaster leaves all destination channels.
stopChannelMediaRelayEx Stops cross-channel media stream relay. Once stopped, the broadcaster leaves all destination channels.
onChannelMediaRelayStateChanged Callback when the state of the channel media relay changes.

Media Push

API Description
startRtmpStreamWithoutTranscoding Starts pushing streams without transcoding.
startRtmpStreamWithoutTranscodingEx Starts pushing streams without transcoding.
startRtmpStreamWithTranscoding Starts pushing streams with transcoding settings.
startRtmpStreamWithTranscodingEx Starts pushing streams with transcoding settings.
stopRtmpStream Stops the CDN stream.
stopRtmpStreamEx Stops the RTMP stream.
updateRtmpTranscoding Updates the RTMP transcoding configuration.
updateRtmpTranscodingEx Updates the RTMP transcoding configuration.
onRtmpStreamingEvent Callback for RTMP streaming events.
onRtmpStreamingStateChanged Callback when the RTMP streaming state changes.
onTranscodingUpdated Callback when the RTMP transcoding settings are updated.

CDN Streaming

API Description
onDirectCdnStreamingStateChanged Callback for changes in CDN streaming state.
onDirectCdnStreamingStats Callback for CDN streaming statistics.

Data Stream

API Description
createDataStream Creates a data stream.
createDataStreamEx Creates a data stream.
sendStreamMessage Sends a data stream.
sendStreamMessageEx Sends a data stream.
onStreamMessage Occurs when a stream message is received from a remote user.
onStreamMessageError Occurs when an error occurs in receiving a stream message from a remote user.

Metadata (SEI)

API Description
registerMediaMetadataObserver Registers a media metadata observer to receive or send metadata.
sendMetaData Sends media metadata.
setMaxMetadataSize Sets the maximum size of media metadata.
unregisterMediaMetadataObserver Unregisters the media metadata observer.
onMetadataReceived Triggered when the receiver receives metadata.

Audio Route

API Description
isSpeakerphoneEnabled Checks whether the speakerphone is enabled.
setDefaultAudioRouteToSpeakerphone Sets the default audio route.
setEnableSpeakerphone Enables or disables speakerphone playback.
setRouteInCommunicationMode Selects the audio route in communication volume mode.
onAudioRoutingChanged Callback when the audio routing changes.

Video Device Management

API Description
enableMultiCamera Enables or disables multi-camera capture.
enumerateVideoDevices Gets a list of all video devices on the system.
getCameraMaxZoomFactor Gets the maximum zoom factor supported by the camera.
getCapability Gets detailed video frame information for a video capture device under a specified video format.
getDevice Gets the currently used video capture device.
getVideoDeviceManager Gets a VideoDeviceManager object to manage video devices.
isCameraAutoExposureFaceModeSupported Checks whether the device supports auto exposure.
isCameraAutoFocusFaceModeSupported Checks whether the device supports face auto-focus.
isCameraExposurePositionSupported Checks whether the device supports manual exposure.
isCameraExposureSupported Checks whether the current camera supports exposure adjustment.
isCameraFaceDetectSupported Checks whether the device camera supports face detection.
isCameraFocusSupported Checks whether the device supports manual focus.
isCameraTorchSupported Checks whether the device supports keeping the flashlight on.
isCameraZoomSupported Checks whether the device supports camera zoom.
numberOfCapabilities Gets the number of video formats supported by the specified video capturing device.
queryCameraFocalLengthCapability Queries the focal length capabilities supported by the camera.
queryCodecCapability Queries the video codec capabilities supported by the SDK.
release Releases all resources occupied by the VideoDeviceManager object.
setCameraAutoExposureFaceModeEnabled Enables or disables the auto exposure feature.
setCameraAutoFocusFaceModeEnabled Sets whether to enable face auto-focus.
setCameraCapturerConfiguration Sets the camera capture configuration.
setCameraDeviceOrientation Sets the rotation angle of the captured video.
setCameraExposureFactor Sets the exposure factor of the current camera.
setCameraExposurePosition Sets the manual exposure position.
setCameraFocusPositionInPreview Sets the manual focus position and triggers focusing.
setCameraTorchOn Sets whether to turn on the flashlight.
setCameraZoomFactor Sets the camera zoom factor.
setDevice Specifies the video capture device by device ID.
switchCamera Switches between front and rear cameras.
onCameraExposureAreaChanged Callback when the camera exposure area changes.
onCameraFocusAreaChanged Callback when the camera focus area changes.
onVideoDeviceStateChanged Callback when a video device changes.

Audio Device Management

API Description
enumeratePlaybackDevices Gets a list of all playback devices in the system.
enumerateRecordingDevices Gets the list of all audio recording devices in the system.
followSystemLoopbackDevice Sets whether the loopback recording device follows the system default playback device.
followSystemPlaybackDevice Sets whether the audio playback device used by the SDK follows the system default playback device.
followSystemRecordingDevice Sets whether the audio recording device used by the SDK follows the system default recording device.
getAudioDeviceInfo Gets audio device information.
getAudioDeviceManager Gets the AudioDeviceManager object to manage audio devices.
getLoopbackDevice Gets the current sound card capture device.
getPlaybackDefaultDevice Gets the system default audio playback device.
getPlaybackDevice Gets the current audio playback device.
getPlaybackDeviceInfo Gets audio playback device information.
getPlaybackDeviceMute Gets the mute status of the current playback device.
getPlaybackDeviceVolume Gets the playback device volume.
getRecordingDefaultDevice Gets the system default audio recording device.
getRecordingDevice Gets the current audio recording device.
getRecordingDeviceInfo Gets information about the audio recording device.
getRecordingDeviceMute Gets the mute status of the current recording device.
getRecordingDeviceVolume Gets the volume of the audio recording device.
release Releases all resources used by the AudioDeviceManager object.
setLoopbackDevice Specifies the sound card capture device.
setPlaybackDevice Specifies the playback device.
setPlaybackDeviceMute Sets the playback device to mute.
setPlaybackDeviceVolume Sets the playback device volume.
setRecordingDevice Specifies the audio recording device.
setRecordingDeviceMute Mutes the current audio recording device.
setRecordingDeviceVolume Sets the volume of the audio recording device.
startAudioDeviceLoopbackTest Starts the audio device loopback test.
startPlaybackDeviceTest Starts the audio playback device test.
startRecordingDeviceTest Starts the audio recording device test.
stopAudioDeviceLoopbackTest Stops the audio device loopback test.
stopPlaybackDeviceTest Stops the audio playback device test.
stopRecordingDeviceTest Stops the audio recording device test.
onAudioDeviceStateChanged Occurs when the audio device state changes.
onAudioDeviceVolumeChanged Occurs when the volume of the audio device or app changes.

Extensions

API Description
enableExtension Enables or disables an extension.
getExtensionProperty Retrieves detailed information about the extension.
loadExtensionProvider Loads an extension.
registerExtension Registers an extension.
setExtensionProperty Sets an extension property.
setExtensionProviderProperty Sets a property for the extension provider.
onExtensionErrorWithContext Callback for extension errors.
onExtensionEventWithContext Plugin event callback.
onExtensionStartedWithContext Callback when the plugin is successfully enabled.
onExtensionStoppedWithContext Callback when the plugin is disabled.

Network and Others

API Description
complain Report call quality issues.
enableEncryption Enable or disable built-in encryption.
enableEncryptionEx Enable or disable built-in encryption.
getAssetAbsolutePath Get the actual absolute path of an asset from its relative asset path.
getCallId Gets the call ID.
getCallIdEx Gets the call ID using the connection ID.
getConnectionState Gets the current network connection state.
getConnectionStateEx Gets the current network connection state.
getCurrentMonotonicTimeInMs Gets the SDK's current monotonic time.
getErrorDescription Gets the warning or error description.
getNativeHandle Gets the C++ handle of the Native SDK.
getNetworkType Gets the local network connection type.
getNtpWallTimeInMs Gets the current NTP (Network Time Protocol) time.
getVersion Gets the SDK version.
isFeatureAvailableOnDevice Checks whether the device supports the specified advanced feature.
queryDeviceScore Queries the device score level.
rate Rates a call.
sendCustomReportMessage Sends a custom report message.
sendCustomReportMessageEx Custom data reporting and analytics service.
setCloudProxy Sets the cloud proxy service.
setParameters JSON configuration information for the SDK, used to provide technical preview or customized features.
setRemoteSubscribeFallbackOption Sets the fallback option for subscribed audio and video streams under poor network conditions.
startEchoTest Starts an audio and video call loop test.
startLastmileProbeTest Starts the last-mile network probe test before a call.
stopEchoTest Stops the audio call loopback test.
stopLastmileProbeTest Stops the last-mile network probe test before a call.
onConnectionLost Callback when the network connection is lost and the SDK fails to reconnect to the server within 10 seconds.
onConnectionStateChanged Callback when the network connection state changes.
onEncryptionError Callback when an error occurs with built-in encryption.
onLastmileProbeResult Callback for the last mile uplink and downlink network quality probe report before the call.
onLastmileQuality Callback for the last mile uplink and downlink network quality report.
onMultipathStats Callback for multipath transmission statistics.
onNetworkQuality Callback for the last mile uplink and downlink network quality report for each user during the call.
onNetworkTypeChanged Callback when the local network type changes.
onPermissionError Callback when failing to obtain device permission.
onPermissionGranted Callback triggered when a permission is granted.
onProxyConnected Callback for proxy connection status.
onRemoteSubscribeFallbackToAudioOnly Callback when the subscribed stream falls back to audio-only or recovers to audio and video.
onUplinkNetworkInfoUpdated Callback for uplink network information changes.