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 an IRtcEngineEx object. |
| initialize | Creates and initializes IRtcEngine. |
| registerEventHandler | Adds a primary callback event. |
| addListener | Adds an IRtcEngineEvent listener. |
| getMediaEngine | Gets the IMediaEngine object. |
| release | Destroys the IRtcEngine object. |
| removeAllListeners | Removes all listeners for the specified event type. |
| unregisterEventHandler | Removes the specified callback event. |
| removeListener | Removes the specified IRtcEngineEvent listener. |
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 | Renews the Token. |
| setClientRole | Sets the user role and audience latency level in live streaming. |
| onClientRoleChanged | Occurs when the user role or audience latency level is switched. |
| onClientRoleChangeFailed | Callback when the user role switch fails. |
| onError | Callback when an error occurs. |
| onJoinChannelSuccess | Callback when successfully joining a channel. |
| onLeaveChannel | Callback when leaving a channel. |
| onRejoinChannelSuccess | Callback when successfully rejoining a channel. |
| onRenewTokenResult | Callback for the result of the renewToken method call. |
| onRequestToken | Callback when the Token has expired. |
| onRtcStats | Callback for current call-related 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 broadcast) joins the current channel. |
| onUserOffline | Callback when a remote user (in communication) or host (in live broadcast) 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 the specified audio stream. |
| muteRemoteVideoStream | Stops or resumes subscribing to the video stream of a specified remote user. |
| muteRemoteVideoStreamEx | Stops or resumes receiving the 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 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 playback volume of all remote users' signal locally. |
| adjustUserPlaybackSignalVolume | Adjusts the playback volume of a specified remote user. |
| adjustUserPlaybackSignalVolumeEx | Adjusts the playback volume of a specified remote user. |
| 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. |
| 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 | Occurs when the local audio state changes. |
| onLocalAudioStats | Reports the statistics of the local audio stream during a call. |
| onRemoteAudioStateChanged | Occurs when the remote audio stream state changes. |
| onRemoteAudioStats | Reports the statistics of the remote audio stream during a call. |
| onRemoteAudioTransportStats | Reports the transport statistics of the remote audio stream during a call. |
| onUserMuteAudio | Callback when a remote user (in communication) or host (in live streaming) stops or resumes sending audio streams. |
Audio Capture
| API | Description |
|---|---|
| adjustLoopbackSignalVolume | Adjusts the volume of the loopback audio signal. |
| adjustRecordingSignalVolume | Adjusts the volume of the recording audio signal. |
| enableInEarMonitoring | Enables in-ear monitoring. |
| enableLocalAudio | Enables or disables local audio capture. |
| enableLoopbackRecording | Enables loopback recording. |
| enableLoopbackRecordingEx | Enables loopback recording. |
| muteRecordingSignal | Whether to mute the recording signal. |
| setInEarMonitoringVolume | Sets the in-ear monitoring volume. |
Audio Effects
| API | Description |
|---|---|
| enableVoiceAITuner | Enables or disables the AI voice tuner feature. |
| setAdvancedAudioOptions | Sets advanced audio options. |
| setAINSMode | Enables or disables AI noise reduction and sets the noise reduction mode. |
| setAudioEffectParameters | Sets parameters for SDK preset voice effects. |
| setAudioEffectPreset | Sets the SDK's preset voice effects. |
| setLocalVoiceEqualization | Sets the local voice equalization effect. |
| setLocalVoiceFormant | Sets the formant ratio to change the voice timbre. |
| setLocalVoicePitch | Sets the pitch of the local voice. |
| setLocalVoiceReverb | Sets the reverb effect for the local voice. |
| setVoiceBeautifierParameters | Sets the parameters for preset voice beautifier effects. |
| setVoiceBeautifierPreset | Sets a preset voice beautifier effect. |
| setVoiceConversionPreset | Sets a 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, that is, the horizontal position. |
| setRemoteVoicePositionEx | Sets the 2D position of a remote user's voice, that is, the horizontal position. |
Spatial Audio
| API | Description |
|---|---|
| initialize | Initializes ILocalSpatialAudioEngine. |
| clearRemotePositions | Deletes the spatial position information of all remote users. |
| enableSpatialAudio | Enables or disables spatial audio. |
| getLocalSpatialAudioEngine | Gets the ILocalSpatialAudioEngine 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 IBaseSpatialAudioEngine. |
| removeRemotePosition | Deletes the spatial position information of the specified remote user. |
| setAudioRecvRange | Sets the audio reception range for the local user. |
| setDistanceUnit | Sets the length (in meters) of one unit of distance in the game engine. |
| setHeadphoneEQParameters | Sets the low and high frequency parameters of the headphone equalizer. |
| setHeadphoneEQPreset | Sets a 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 audio attenuation effect for the 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 spatial position of the local user. |
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 frame observer object. |
| setEarMonitoringAudioFrameParameters | Sets the audio data format for in-ear monitoring. |
| setMixedAudioFrameParameters | Sets the raw audio data format after audio mixing of captured and playback audio. |
| setPlaybackAudioFrameBeforeMixingParameters | Sets the raw audio playback data format before mixing. |
| setPlaybackAudioFrameParameters | Sets the format of the raw audio data for playback. |
| setRecordingAudioFrameParameters | Sets the format of the raw audio data for recording. |
| unregisterAudioFrameObserver | Unregisters the audio frame observer. |
| onEarMonitoringAudioFrame | Receives the raw audio data for ear monitoring. |
| onMixedAudioFrame | Retrieves the audio data after mixing the captured and playback audio. |
| onPlaybackAudioFrame | Receives the raw audio data for playback. |
| onPlaybackAudioFrameBeforeMixing | Receives the audio of subscribed remote users before mixing. |
| onRecordAudioFrame | Receives the raw audio data for recording. |
Encoded Audio Data
| API | Description |
|---|---|
| registerAudioEncodedFrameObserver | Registers an 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 encoded audio data of all remote users. |
| onRecordAudioEncodedFrame | Retrieves the encoded audio data of the local user. |
Custom Audio Capture and Rendering
| API | Description |
|---|---|
| adjustCustomAudioPlayoutVolume | Adjusts the playout volume of a custom audio capture track locally. |
| adjustCustomAudioPublishVolume | Adjusts the playback volume of a custom audio capture track on the remote end. |
| createCustomAudioTrack | Creates a custom audio capture track. |
| destroyCustomAudioTrack | Destroys the specified audio track. |
| enableCustomAudioLocalPlayback | Sets whether to play external audio sources 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 configuration. |
| setVideoEncoderConfigurationEx | Sets the video encoding configuration. |
| setVideoScenario | Sets the video application scenario. |
| startPreviewWithoutSourceType | Starts video preview. |
| startPreview | Starts video preview and specifies the video source to preview. |
| stopPreview | Stops video preview. |
| onFirstLocalVideoFrame | Occurs when the first local video frame is displayed. |
| onFirstLocalVideoFramePublished | Occurs when the first local video frame is published. |
| onFirstRemoteVideoDecoded | Occurs when the remote video is received and decoded. |
| onFirstRemoteVideoFrame | Occurs when the renderer receives the first frame of remote video. |
| onLocalVideoStateChanged | Occurs when the local video state changes. |
| onLocalVideoStats | Reports the statistics of the local video stream. |
| onRemoteVideoStateChanged | Occurs when the remote video state changes. |
| onRemoteVideoStats | Reports the statistics of the video stream sent by each remote user during a call. |
| onUserEnableVideo | Occurs when a remote user enables or disables the video module. |
| onUserMuteVideo | Occurs when a remote user stops or resumes publishing the video stream. |
| onVideoPublishStateChanged | Occurs when the video publishing state changes. |
| onVideoSizeChanged | Occurs when the local or remote video size or rotation changes. |
Camera Capture
| API | Description |
|---|---|
| startCameraCapture | Starts video capture using the camera. |
| stopCameraCapture | Stops video capture using the camera. |
Screen Capture
| API | Description |
|---|---|
| getScreenCaptureSources | Gets a list of shareable screen and window objects. |
| setScreenCaptureContentHint | Sets the content type for screen sharing. |
| setScreenCaptureScenario | Sets the screen sharing scenario. |
| startScreenCaptureBySourceType | Starts screen capture and specifies the video source. |
| startScreenCaptureByDisplayId | Starts capturing video stream from 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. |
| updateScreenCaptureParameters | Updates the screen capture configuration parameters. |
| updateScreenCaptureRegion | Updates the screen capture region. |
Snapshot
| API | Description |
|---|---|
| enableContentInspect | Enables/disables local snapshot upload. |
| enableContentInspectEx | Enables/disables local snapshot upload. |
| takeSnapshot | Takes a video snapshot. |
| takeSnapshotWithConfig | Takes a video snapshot at a specified observation point. |
| takeSnapshotEx | Takes a video snapshot using the connection ID. |
| takeSnapshotWithConfigEx | Takes a video snapshot at a specified observation point using the connection ID. |
| onSnapshotTaken | Callback for video snapshot result. |
Virtual Background
| API | Description |
|---|---|
| enableVirtualBackground | Enables/disables the virtual background. |
Local Video Transcoding
| API | Description |
|---|---|
| startLocalVideoTranscoder | Starts local video mixing. |
| stopLocalVideoTranscoder | Stops local video mixing. |
| updateLocalTranscoderConfiguration | Updates the local video mixing configuration. |
| onLocalVideoTranscoderError | Callback when a local video mixing error occurs. |
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 a video effect object. |
| getFaceShapeAreaOptions | Gets options for facial area enhancement. |
| getFaceShapeBeautyOptions | Gets options for facial beauty effects. |
| getVideoEffectBoolParam | Gets the boolean parameter in the video effect. |
| getVideoEffectFloatParam | Gets the value of the specified float type parameter in the video effect. |
| getVideoEffectIntParam | Gets the integer type parameter in 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 | Enables color enhancement. |
| 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 low-light enhancement. |
| setVideoDenoiserOptions | Sets video denoising. |
| setVideoEffectBoolParam | Sets a boolean parameter for the video effect. |
| setVideoEffectFloatParam | Sets the float parameter of a video effect. |
| setVideoEffectIntParam | setVideoEffectIntParam: Sets an integer parameter for the video effect. |
Speech Driven
| API | Description |
|---|---|
| registerFaceInfoObserver | Registers a face information observer. |
| unregisterFaceInfoObserver | Unregisters the face information observer. |
| onFaceInfo | Reports 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 a 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 |
|---|---|
| destroyRendererByConfig | Destroys multiple video renderer objects. |
| destroyRendererByView | Destroys a single video renderer object. |
| 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. |
| onVideoRenderingTracingResult | Video frame rendering event callback. |
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 triggered when a video frame is received. |
| onPreEncodeVideoFrame | Gets the video data before local encoding. |
| onRenderVideoFrame | Gets the video data sent by the remote user. |
Encoded Video Data
| API | Description |
|---|---|
| addListener | Adds an IMediaEngineEvent listener. |
| registerVideoEncodedFrameObserver | Registers a video frame observer for encoded video frames. |
| removeAllListeners | Removes all listeners for the specified event. |
| removeListener | Removes the specified IMediaEngineEvent listener. |
| unregisterVideoEncodedFrameObserver | Unregisters the video frame observer for encoded video frames. |
| onEncodedVideoFrameReceived | Reports that a remote encoded video frame has been received. |
Custom Video Capture and Rendering
| API | Description |
|---|---|
| createCustomVideoTrack | Creates a custom video track. |
| destroyCustomVideoTrack | Destroys the specified video track. |
| pushVideoFrame | Publishes external raw video frames to the channel through a custom video track. |
| setExternalVideoSource | Sets the external video source. |
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 transmission. |
| 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 | Callback for music file playback progress. |
| onAudioMixingStateChanged | Callback when the music file playback state 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 audio 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 an audio effect file. |
| playAllEffects | Plays all audio effect files. |
| playEffect | Plays the specified local or online audio effect file. |
| playEffectEx | Plays the specified sound effect in the channel. |
| preloadEffect | Loads the audio effect file into memory. |
| preloadEffectEx | Preloads the specified sound 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 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 |
|---|---|
| addListener | Adds an IMediaPlayerEvent listener. |
| createMediaPlayer | Creates a media player object. |
| destroyMediaPlayer | Destroys the media player. |
| getMediaPlayerCacheManager | Gets an instance of IMediaPlayerCacheManager. |
| removeAllListeners | Removes all listeners for the specified event. |
| removeListener | Removes the specified IMediaPlayerEvent listener. |
Media Resource Open
| API | Description |
|---|---|
| open | Opens a media resource. |
| openWithMediaSource | Opens a media resource and configures playback. |
| preloadSrc | Preloads a media resource. |
| switchSrc | Switches the media source. |
| unloadSrc | Releases the preloaded media source. |
Media Resource Playback and Rendering
| API | Description |
|---|---|
| selectAudioTrack | Specifies the audio track to play in 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 rendering view of the player. |
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 pause. |
| 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 media 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 media player. |
| getStreamCount | Gets the number of media streams in the current media file. |
| getStreamInfo | Gets media stream information by the index of the media stream. |
| onPlayerPlaybackStats | Reports information about the currently playing media resource. |
Media Player Observer
| API | Description |
|---|---|
| registerAudioFrameObserver | Registers an audio frame observer. |
| registerPlayerSourceObserver | Registers a player source observer. |
| registerVideoFrameObserver | Registers a video frame observer. |
| unregisterAudioFrameObserver | Unregisters the audio frame observer. |
| unregisterPlayerSourceObserver | Unregisters the player source observer. |
| unregisterVideoFrameObserver | Unregisters the video frame observer. |
| onAudioVolumeIndication | Audio volume indication callback from the media player. |
| onFrame | Callback when an audio frame is received. |
| onMetaData | Reports retrieved media metadata. |
| onPlayBufferUpdated | Reports the playable duration of the current buffer. |
| onPlayerEvent | Reports events from the media player. |
| onPlayerInfoUpdated | Callback when media player-related information changes. |
| onPlayerSourceStateChanged | Reports changes in the player state. |
| onPlayerSrcInfoChanged | Callback for video bitrate change of media resource. |
| onPositionChanged | Reports the current playback progress of the media resource. |
| onPreloadEvent | Reports events related to preloading media resources. |
Media Player Cache
| API | Description |
|---|---|
| enableAutoRemoveCache | Sets whether to enable the automatic cache file removal feature. |
| getCacheDir | Gets the storage path of cached files. |
| getCacheFileCount | Gets the total number of currently cached media files. |
| getMaxCacheFileCount | Gets the maximum number of cached files set. |
| getMaxCacheFileSize | Gets the upper limit of the total cache size for cached files. |
| 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 maximum 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 forwarding to all destination channels. |
| pauseAllChannelMediaRelayEx | Pauses media stream forwarding to all destination channels. |
| resumeAllChannelMediaRelay | Resumes media stream forwarding to all destination channels. |
| resumeAllChannelMediaRelayEx | Resumes media stream forwarding to all destination channels. |
| startOrUpdateChannelMediaRelay | Starts or updates cross-channel media stream forwarding. |
| startOrUpdateChannelMediaRelayEx | Starts or updates the media stream relay across channels. |
| stopChannelMediaRelay | Stops the media stream relay across channels. Once stopped, the broadcaster leaves all destination channels. |
| stopChannelMediaRelayEx | Stops the media stream relay across channels. Once stopped, the broadcaster leaves all destination channels. |
| onChannelMediaRelayStateChanged | Occurs when the state of media stream relay across channels changes. |
Media Push
| API | Description |
|---|---|
| startRtmpStreamWithoutTranscoding | Starts pushing media streams without transcoding. |
| startRtmpStreamWithoutTranscodingEx | Starts pushing media streams without transcoding. |
| startRtmpStreamWithTranscoding | Starts pushing streams to a CDN and sets the transcoding configuration. |
| startRtmpStreamWithTranscodingEx | Starts pushing streams to a CDN and sets the transcoding configuration. |
| stopRtmpStream | Stops pushing streams to a CDN. |
| stopRtmpStreamEx | Stops pushing streams to a CDN. |
| updateRtmpTranscoding | Updates the CDN transcoding configuration. |
| updateRtmpTranscodingEx | Updates the CDN transcoding configuration. |
| onRtmpStreamingEvent | Callback for CDN 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 when the CDN streaming state changes. |
| 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 | Callback when receiving a data stream message from a remote user. |
| onStreamMessageError | Callback when an error occurs in receiving a data 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 metadata is received on the receiving end. |
Audio Route
| API | Description |
|---|---|
| onAudioRoutingChanged | Callback triggered when the audio routing changes. |
Video Device Management
| API | Description |
|---|---|
| enumerateVideoDevices | Gets the list of all video devices in the system. |
| getCapability | Gets the detailed video frame information of the video capture device under the specified video format. |
| getDevice | Gets the currently used video capture device. |
| getVideoDeviceManager | Gets the IVideoDeviceManager object to manage video devices. |
| numberOfCapabilities | Gets the number of video formats supported by the specified video capture device. |
| queryCodecCapability | Queries the video codec capabilities supported by the SDK. |
| setCameraCapturerConfiguration | Sets the camera capture configuration. |
| setCameraDeviceOrientation | Sets the rotation angle of the captured video. |
| setDevice | Specifies the video capture device by device ID. |
| onVideoDeviceStateChanged | Video device state change callback. |
Audio Device Management
| API | Description |
|---|---|
| enumeratePlaybackDevices | Gets the 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 device follows the system default playback device. |
| followSystemPlaybackDevice | Sets whether the SDK's playback device follows the system default playback device. |
| followSystemRecordingDevice | Sets whether the SDK's recording device follows the system default recording device. |
| getAudioDeviceManager | Gets the IAudioDeviceManager object to manage audio devices. |
| getLoopbackDevice | Gets the current loopback device. |
| getPlaybackDefaultDevice | Gets the system default playback device. |
| getPlaybackDevice | Gets the current playback device. |
| getPlaybackDeviceInfo | Gets 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 audio recording device information. |
| getRecordingDeviceMute | Gets the mute status of the current recording device. |
| getRecordingDeviceVolume | Gets the volume of the recording device. |
| release | Releases all resources occupied by the IAudioDeviceManager object. |
| setLoopbackDevice | Specifies the loopback 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 | Callback for changes in audio device state. |
| onAudioDeviceVolumeChanged | Callback when the volume of an audio device or app changes. |
Extensions
| API | Description |
|---|---|
| enableExtension | Enables or disables an extension. |
| getExtensionProperty | Retrieves detailed information about an extension. |
| loadExtensionProvider | Loads an extension. |
| registerExtension | Registers an extension. |
| setExtensionProperty | Sets the properties of an extension. |
| setExtensionProviderProperty | Sets the properties of an extension provider. |
| onExtensionErrorWithContext | Callback when an extension error occurs. |
| onExtensionEventWithContext | Callback for extension events. |
| onExtensionStartedWithContext | Callback when an extension is successfully enabled. |
| onExtensionStoppedWithContext | Callback when an extension is disabled. |
Network and Others
| API | Description |
|---|---|
| complain | Reports call quality issues. |
| enableEncryption | Enables or disables built-in encryption. |
| enableEncryptionEx | Enables or disables built-in encryption. |
| 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 description of a warning or error. |
| 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 analysis service. |
| setCloudProxy | Sets the cloud proxy service. |
| setParameters | JSON configuration information for the SDK, used to provide technical previews or customized features. |
| setRemoteSubscribeFallbackOption | Sets fallback options for subscribed audio and video streams under poor network conditions. |
| startEchoTest | Starts an audio and video call loop test. |
| startLastmileProbeTest | Starts a last-mile network probe test before a call. |
| stopEchoTest | Stops the audio loopback test. |
| stopLastmileProbeTest | Stops the last-mile network probe test. |
| onConnectionLost | Occurs when the network connection is lost and the SDK fails to reconnect to the server within 10 seconds. |
| onConnectionStateChanged | Occurs when the network connection state changes. |
| onEncryptionError | Occurs when an error occurs in built-in encryption. |
| onLastmileProbeResult | Reports the last-mile network probe result before a call. |
| onLastmileQuality | Reports the last-mile network quality before a call. |
| onMultipathStats | Callback for multipath transmission statistics. |
| onNetworkQuality | Reports the last-mile network quality of each user during a call. |
| onNetworkTypeChanged | Callback when the local network type changes. |
| onPermissionError | Callback when failing to obtain device permission. |
| onProxyConnected | Callback for proxy connection status. |
| onRemoteSubscribeFallbackToAudioOnly | Callback when the subscribed stream falls back to audio-only or recovers to audio-video. |
| onUplinkNetworkInfoUpdated | Callback when uplink network information changes. |