Client APIs

    Function Overview

    Last updated:2024-03-14 21:27

    ZEGO SDK has network nodes that fully cover key areas of the world, provides rich APIs, and provides clear and stable real-time voice and video cloud services for multiple terminals.

    For the error codes returned by the API, please refer to: https://www.zegocloud.com/docs/video-call/error-code.

    The following is a brief introduction to the basic API.

    main

    Method Description
    createEngine Create ZegoExpressEngine singleton object and initialize SDK.
    destroyEngine Destroy the ZegoExpressEngine singleton object and deinitialize the SDK.
    getEngine Returns the singleton instance of ZegoExpressEngine.
    setEngineConfig Set advanced engine configuration.
    setEngineConfig Set advanced engine configuration with Android Application context.
    setLogConfig Set log configuration.
    setLocalProxyConfig Set local proxy config.
    setCloudProxyConfig Set cloud proxy config.
    setLicense Set license auth.
    setRoomMode Set room mode.
    setGeoFence Set Geo Fence.
    getVersion Gets the SDK's version number.
    setApiCalledCallback Set method execution result callback.
    isFeatureSupported Query whether the current SDK supports the specified feature.
    setEventHandler Sets up the event notification callbacks that need to be handled. If the eventHandler is set to [null], all the callbacks set previously will be cleared.
    setRoomScenario Set room scenario.
    uploadLog Uploads logs to the ZEGO server.
    uploadLog Uploads logs to the ZEGO server, with callback.
    submitLog Uploads logs to the ZEGO server.
    enableDebugAssistant Enable the debug assistant. Note, do not enable this feature in the online version! Use only during development phase!
    callExperimentalAPI Call the experimental API.
    onDebugError The callback for obtaining debugging error information.
    onApiCalledResult Method execution result callback
    onEngineStateUpdate The callback triggered when the audio/video engine state changes.
    onRecvExperimentalAPI Experimental API callback
    onFatalError The callback that triggered a fatal error, causing the SDK to malfunction and unable to function properly.

    room

    Method Description
    loginRoom Logs in to a room. You must log in to a room before publishing or playing streams.
    loginRoom Logs in to a room with advanced room configurations. You must log in to a room before publishing or playing streams.
    loginRoom Log in to the room by configuring advanced properties, and return the login result through the callback parameter. You must log in to the room before pushing or pulling the stream.
    logoutRoom Exit the room.
    logoutRoom Exit the room with callback.
    logoutRoom Exit the room of the specified room ID.
    logoutRoom Exit the room of the specified room ID with callback.
    switchRoom Switch the room.
    switchRoom Switch the room with advanced room configurations.
    renewToken Renew token.
    setRoomExtraInfo Set room extra information.
    getRoomStreamList Get room stream list.
    onRoomStateUpdate Notification of the room connection state changes.
    onRoomStateChanged Notification of the room connection state changes, including specific reasons for state change.
    onRoomUserUpdate The callback triggered when the number of other users in the room increases or decreases.
    onRoomOnlineUserCountUpdate The callback triggered every 30 seconds to report the current number of online users.
    onRoomStreamUpdate The callback triggered when the number of streams published by the other users in the same room increases or decreases.
    onRoomStreamExtraInfoUpdate The callback triggered when there is an update on the extra information of the streams published by other users in the same room.
    onRoomExtraInfoUpdate The callback triggered when there is an update on the extra information of the room.
    onRoomTokenWillExpire Callback notification that room Token authentication is about to expire.

    publisher

    Method Description
    startPublishingStream Start publishing a stream.
    startPublishingStream Starts publishing a stream (for the specified channel). You can call this function to publish a second stream.
    startPublishingStream Starts publishing a stream. Support multi-room mode.
    startPublishingStreamInScene Starts publishing a stream in RangeScene scene.
    stopPublishingStream Stops publishing a stream.
    stopPublishingStream Stops publishing a stream (for the specified channel).
    setStreamExtraInfo Sets the extra information of the stream being published.
    setStreamExtraInfo Sets the extra information of the stream being published for the specified publish channel.
    startPreview Starts/Updates the local video preview.
    startPreview Starts/Updates the local video preview (for the specified channel).
    startPreview Starts the local audio preview.
    stopPreview Stops the local preview.
    stopPreview Stops the local preview (for the specified channel).
    setVideoConfig Sets up the video configurations.
    setVideoConfig Sets up the video configurations (for the specified channel).
    getVideoConfig Gets the current video configurations.
    getVideoConfig Gets the current video configurations (for the specified channel).
    setPublishDualStreamConfig Set dual stream config.
    setVideoMirrorMode Sets the video mirroring mode.
    setVideoMirrorMode Sets the video mirroring mode (for the specified channel).
    setAppOrientation Set the video orientation.
    setAppOrientation Sets the video orientation (for the specified channel).
    setAudioConfig Sets up the audio configurations.
    setAudioConfig Sets up the audio configurations for the specified publish channel.
    getAudioConfig Gets the current audio configurations.
    getAudioConfig Gets the current audio configurations from the specified publish channel.
    setPublishStreamEncryptionKey Set encryption key for the publishing stream.
    setPublishStreamEncryptionKey Set encryption key for the publishing stream for the specified publish channel.
    takePublishStreamSnapshot Take a snapshot of the publishing stream.
    takePublishStreamSnapshot Take a snapshot of the publishing stream for the specified publish channel.
    mutePublishStreamAudio Stops or resumes sending the audio part of a stream.
    mutePublishStreamAudio Stops or resumes sending the audio part of a stream for the specified channel.
    mutePublishStreamVideo Stops or resumes sending the video part of a stream.
    mutePublishStreamVideo Stops or resumes sending the video part of a stream for the specified channel.
    setStreamAlignmentProperty Enable or disable the stream mixing precision alignment function.
    enableTrafficControl Enables or disables traffic control.
    enableTrafficControl Enables or disables the traffic control for the specified publish channel.
    setMinVideoBitrateForTrafficControl Set the minimum video bitrate threshold for traffic control.
    setMinVideoBitrateForTrafficControl Sets the minimum video bitrate for traffic control for the specified publish channel.
    setMinVideoFpsForTrafficControl Sets the minimum video frame rate threshold for traffic control.
    setMinVideoResolutionForTrafficControl Sets the minimum video resolution threshold for traffic control.
    setTrafficControlFocusOn Set the factors of concern that trigger traffic control.
    setTrafficControlFocusOn Set the factors of concern that trigger traffic control for the specified publish channel.
    setCaptureVolume Sets the audio recording volume for stream publishing.
    setAudioCaptureStereoMode Set audio capture stereo mode.
    addPublishCdnUrl Adds a target CDN URL to which the stream will be relayed from ZEGO RTC server.
    addPublishCdnUrl Adds a target CDN URL to which the stream will be relayed from ZEGO RTC server.
    removePublishCdnUrl Deletes the specified CDN URL, which is used for relaying streams from ZEGO RTC server to CDN.
    enablePublishDirectToCDN Whether to directly push to CDN (without going through the ZEGO RTC server).
    enablePublishDirectToCDN Whether to directly push to CDN (without going through the ZEGO RTC server), for the specified channel.
    setPublishWatermark Sets up the stream watermark before stream publishing.
    setPublishWatermark Sets up the stream watermark before stream publishing (for the specified channel).
    setSEIConfig Set the Supplemental Enhancement Information type.
    sendSEI Sends Supplemental Enhancement Information.
    sendSEI Sends Supplemental Enhancement Information to the specified publish channel.
    sendSEISyncWithCustomVideo Send the media supplementary enhancement information synchronized with the current video frame during custom video capture.
    sendAudioSideInfo Send audio side information.
    enableHardwareEncoder Enables or disables hardware encoding.
    setCapturePipelineScaleMode Sets the timing of video scaling in the video capture workflow. You can choose to do video scaling right after video capture (the default value) or before encoding.
    setDummyCaptureImagePath Set the path of the static picture would be published when the camera is closed.
    enableH265EncodeFallback Whether to enable H.265 encoding to automatically downgrade to H.264 encoding.
    isVideoEncoderSupported Whether the specified video encoding type is supported.
    isVideoEncoderSupported Whether the specified video encoding type and implementation are supported.
    setAppOrientationMode Set the orientation mode of the video.
    setLowlightEnhancement Set low light enhancement.
    setVideoSource Set video capture source.
    setVideoSource Set a video capture instance as the video capture source.
    setVideoSource Set video capture source for the specified channel.
    setVideoSource Set a video capture instance as video capture source for the specified channel.
    setAudioSource Set audio capture source.
    setAudioSource Set audio capture source for the specified channel.
    setAudioSource Set audio capture source with audio mix config.
    enableVideoObjectSegmentation Enable video object segmentation.
    enableVideoObjectSegmentation Enable video object segmentation.
    enableAlphaChannelVideoEncoder Enable video encoder alpha channel support.
    setCameraStabilizationMode Set the camera stabilization mode.
    onPublisherStateUpdate The callback triggered when the state of stream publishing changes.
    onPublisherQualityUpdate Callback for current stream publishing quality.
    onPublisherCapturedAudioFirstFrame The callback triggered when the first audio frame is captured.
    onPublisherCapturedVideoFirstFrame The callback triggered when the first video frame is captured.
    onPublisherSendAudioFirstFrame The callback triggered when the first audio frame is sent.
    onPublisherSendVideoFirstFrame The callback triggered when the first video frame is sent.
    onPublisherRenderVideoFirstFrame The callback triggered when the first video frame is rendered.
    onPublisherVideoSizeChanged The callback triggered when the video capture resolution changes.
    onPublisherRelayCDNStateUpdate The callback triggered when the state of relayed streaming to CDN changes.
    onPublisherVideoEncoderChanged The callback triggered when the video encoder changes in publishing stream.
    onPublisherStreamEvent The callback triggered when publishing stream.
    onVideoObjectSegmentationStateChanged The video object segmentation state changed.
    onPublisherLowFpsWarning Video encoding low frame rate warning.
    onPublisherDummyCaptureImagePathError The notification for setting the path of the static image displayed when the camera is turned off is incorrect.

    player

    Method Description
    startPlayingStream Starts playing a stream from ZEGO RTC server.
    startPlayingStream Starts playing a stream from ZEGO RTC server or from third-party CDN. Support multi-room mode.
    startPlayingStream Starts playing a stream from ZEGO RTC server, without Canvas, it is more suitable for pure audio stream.
    startPlayingStream Starts playing a stream from ZEGO RTC server or from third-party CDN, without Canvas, it is more suitable for pure audio stream.
    startPlayingStreamInScene Starts playing a stream from ZEGO RTC server or from third-party CDN when using RangeScene.
    startPlayingStreamInScene Starts playing a stream from ZEGO RTC server or from third-party CDN when using RangeScene, without Canvas, it is more suitable for pure audio stream.
    stopPlayingStream Stops playing a stream.
    setPlayStreamDecryptionKey Set decryption key for the playing stream.
    setPlayStreamCrossAppInfo Set up cross App playing stream information.
    takePlayStreamSnapshot Take a snapshot of the playing stream.
    setPlayVolume Sets the stream playback volume.
    setAllPlayStreamVolume Sets the all stream playback volume.
    setPlayStreamVideoType Set play video stream type.
    setPlayStreamBufferIntervalRange Set the adaptive adjustment interval range of the buffer for playing stream.
    setPlayStreamFocusOn Set the weight of the pull stream priority.
    mutePlayStreamAudio Whether the pull stream can receive the specified audio data.
    mutePlayStreamVideo Whether the pull stream can receive the specified video data.
    muteAllPlayStreamAudio Can the pull stream receive all audio data.
    muteAllPlayAudioStreams Can the pull stream receive all audio data.
    muteAllPlayStreamVideo Can the pull stream receive all video data.
    muteAllPlayVideoStreams Can the pull stream receive all video data.
    enableHardwareDecoder Enables or disables hardware decoding.
    enableCheckPoc Enables or disables frame order detection.
    isVideoDecoderSupported Whether the specified video decoding format is supported.
    isVideoDecoderSupported Whether the specified video decoding format is supported.
    setPlayStreamsAlignmentProperty Set the play stream alignment properties.
    enableVideoSuperResolution Enable video super resolution.
    initVideoSuperResolution Init video super resolution.
    uninitVideoSuperResolution Uninit video super resolution.
    updatePlayingCanvas Update playing canvas.
    onPlayerStateUpdate The callback triggered when the state of stream playing changes.
    onPlayerQualityUpdate Callback for current stream playing quality.
    onPlayerMediaEvent The callback triggered when a media event occurs during streaming playing.
    onPlayerRecvAudioFirstFrame The callback triggered when the first audio frame is received.
    onPlayerRecvVideoFirstFrame The callback triggered when the first video frame is received. Except for Linux systems, this callback is thrown from the ui thread by default.
    onPlayerSyncRecvVideoFirstFrame The callback triggered when the first video frame is received. This function will not switch the ui thread callback. Please do not call the SDK interface in the callback thread.
    onPlayerRenderVideoFirstFrame The callback triggered when the first video frame is rendered.
    onPlayerRenderCameraVideoFirstFrame Calls back when the stream playing end renders the first frame of the video from the remote camera.
    onPlayerVideoSizeChanged The callback triggered when the stream playback resolution changes.
    onPlayerRecvSEI The callback triggered when Supplemental Enhancement Information is received.
    onPlayerSyncRecvSEI The callback triggered when Supplemental Enhancement Information is received synchronously.
    onPlayerRecvMediaSideInfo The callback triggered when Supplemental Enhancement Information is received synchronously.
    onPlayerRecvAudioSideInfo Receive the audio side information content of the remote stream.
    onPlayerLowFpsWarning Playing stream low frame rate warning.
    onPlayerStreamEvent The callback triggered when playing stream.
    onPlayerVideoSuperResolutionUpdate Playing stream video super resolution enabled state changes.

    IM

    Method Description
    createRealTimeSequentialDataManager Create the real time sequential data manager instance
    destroyRealTimeSequentialDataManager Destroy the real time sequential data manager instance
    setEventHandler Sets up the real-time sequential data event handler.
    startBroadcasting Start broadcasting real-time sequential data stream.
    stopBroadcasting Stop broadcasting real-time sequential data stream.
    sendRealTimeSequentialData Send real-time sequential data to the broadcasting stream ID.
    startSubscribing Start subscribing real-time sequential data stream.
    stopSubscribing Stop subscribing real-time sequential data stream.
    getIndex Get real-time sequential data manager index.
    onReceiveRealTimeSequentialData Callback for receiving real-time sequential data.
    sendBroadcastMessage Sends a Broadcast Message.
    sendBarrageMessage Sends a Barrage Message (bullet screen) to all users in the same room, without guaranteeing the delivery.
    sendCustomCommand Sends a Custom Command to the specified users in the same room.
    sendTransparentMessage Sends a transparent message in room.
    onRecvRoomTransparentMessage The callback triggered when Barrage Messages are received.
    onIMRecvBroadcastMessage The callback triggered when Broadcast Messages are received.
    onIMRecvBarrageMessage The callback triggered when Barrage Messages are received.
    onIMRecvCustomCommand The callback triggered when a Custom Command is received.

    mixer

    Method Description
    startMixerTask Starts a stream mixing task.
    stopMixerTask Stops a stream mixing task.
    startAutoMixerTask Starts an auto stream mixing task.
    stopAutoMixerTask Stops an auto stream mixing task.
    onMixerRelayCDNStateUpdate The callback triggered when the state of relayed streaming of the mixed stream to CDN changes.
    onMixerSoundLevelUpdate The callback triggered when the sound level of any input stream changes in the stream mixing process.
    onAutoMixerSoundLevelUpdate The callback triggered when the sound level of any input stream changes in the auto stream mixing process.

    preprocess

    Method Description
    enableAEC Whether to enable acoustic echo cancellation (AEC).
    enableHeadphoneAEC Whether to turn on acoustic echo cancellation (AEC) when using the headphone.
    setAECMode Sets the acoustic echo cancellation (AEC) mode.
    enableAGC Enables or disables automatic gain control (AGC).
    enableANS Enables or disables active noise suppression (ANS, aka ANC).
    enableTransientANS Enables or disables transient noise suppression.
    setANSMode Sets the automatic noise suppression (ANS) mode.
    enableSpeechEnhance Enables or disables speech enhancement.
    enableAudioMixing Enables or disables audio mixing function.
    setAudioMixingHandler Sets up the audio mixing event handler.
    muteLocalAudioMixing Mute or resume local playback of the mixing audio.
    setAudioMixingVolume Sets the audio mixing output volume for both local playback and the stream to be published.
    setAudioMixingVolume Sets the audio mixing output volume for either local playback or the stream to published.
    startEffectsEnv Enable the Effects beauty environment.
    stopEffectsEnv Disable the Effects beauty environment.
    enableEffectsBeauty Enables or disables the beauty effect.
    setEffectsBeautyParam Set beautify param.
    setAudioEqualizerGain Set the sound equalizer (EQ).
    setVoiceChangerPreset Setting up the voice changer via preset enumeration.
    setVoiceChangerParam Setting up the specific voice changer parameters.
    setReverbPreset Setting up the reverberation via preset enumeration.
    setReverbAdvancedParam Setting up the specific reverberation parameters.
    setReverbEchoParam Setting up the specific reverberation echo parameters.
    enableVirtualStereo Enable or disable the virtual stereo effect when publishing stream.
    enablePlayStreamVirtualStereo Enable or disable the virtual stereo effect when playing stream.
    setElectronicEffects Turn on or off the electronic sound effect.
    enableColorEnhancement Enable color enhancement.
    onAudioMixingCopyData Audio mixing callback.

    mediaPlayer

    Method Description
    createMediaPlayer Creates a media player instance.
    destroyMediaPlayer Destroys a media player instance.
    setEventHandler Set event notification callback handler of the media player.
    setVideoHandler Set video data callback handler of the media player.
    setAudioHandler Set audio data callback handler of the media player.
    setBlockDataHandler Set the media resource block data callback handler of the media player.
    loadResource Load local or network media resource.
    loadResourceWithPosition Load local or network media resource and specify the start position.
    loadResourceFromMediaData Load binary audio resource.
    loadCopyrightedMusicResourceWithPosition Load copyrighted music resource.
    loadResourceWithConfig Load local or network media resource with config.
    start Start playing.
    stop Stop playing.
    pause Pause playing.
    resume Resume playing.
    seekTo Set the specified playback progress.
    enableRepeat Whether to repeat playback.
    setPlaySpeed Set the speed of play.
    enableAux Whether to mix the player's sound into the stream being published.
    muteLocal Whether to play locally silently.
    setPlayerCanvas Set the view of the player playing video.
    setVolume Set mediaplayer volume. Both the local play volume and the publish volume are set.
    setPlayVolume Set mediaplayer local playback volume.
    setPublishVolume Set mediaplayer publish volume.
    setProgressInterval Set playback progress callback interval.
    getPlayVolume Gets the current local playback volume of the mediaplayer, the range is 0 ~ 200, with the default value of 60.
    getPublishVolume Gets the current publish volume of the mediaplayer, the range is 0 ~ 200, with the default value of 60.
    getTotalDuration Get the total progress of your media resources.
    getCurrentProgress Get current playing progress.
    getCurrentRenderingProgress Get current rendering progress.
    getAudioTrackCount Get the number of audio tracks of the playback file.
    setAudioTrackIndex Set the audio track of the playback file.
    setAudioTrackMode Set the audio track mode of the player.
    setAudioTrackPublishIndex Set the audio track for the media file to be publish.
    setVoiceChangerParam Setting up the specific voice changer parameters.
    getCurrentState Get the current playback status.
    getIndex Get media player index.
    takeSnapshot Take a screenshot of the current playing screen of the media player.
    enableAccurateSeek Enable accurate seek and set relevant attributes.
    setNetWorkResourceMaxCache Set the maximum cache duration and cache data size of web materials.
    getNetWorkResourceCache Get the playable duration and size of the cached data of the current network material cache queue
    setNetWorkBufferThreshold Use this interface to set the cache threshold that the media player needs to resume playback. The SDK default value is 5000ms,The valid value is greater than or equal to 1000ms
    enableSoundLevelMonitor Whether to enable sound level monitoring.
    enableFrequencySpectrumMonitor Whether to enable frequency spectrum monitoring.
    setActiveAudioChannel Set the playback channel.
    clearView Clears the last frame of the playback control that remains on the control after playback ends.
    getMediaInfo Get meida information such as video resolution from media file.
    updatePosition Update the position of the media player (audio source).
    setHttpHeader Set http headers.
    setPlayMediaStreamType Set play media stream type.
    enableLiveAudioEffect Enable live audio effect.
    enableLocalCache Enable local caching of http/https network resources.
    getPlaybackStatistics Get playback statistics.
    onMediaPlayerStateUpdate MediaPlayer playback status callback.
    onMediaPlayerNetworkEvent The callback triggered when the network status of the media player changes.
    onMediaPlayerPlayingProgress The callback to report the current playback progress of the media player.
    onMediaPlayerRenderingProgress The callback to report the current rendering progress of the media player.
    onMediaPlayerVideoSizeChanged The callback triggered when when the resolution of the playback video changes.
    onMediaPlayerRecvSEI The callback triggered when the media player got media side info.
    onMediaPlayerSoundLevelUpdate The callback of sound level update.
    onMediaPlayerFrequencySpectrumUpdate The callback of frequency spectrum update.
    onMediaPlayerFirstFrameEvent The callback triggered when the media player plays the first frame.
    onMediaPlayerLocalCache The callback triggered when the media player caches http/https network resource locally.
    onVideoFrame The callback triggered when the media player throws out video frame data.
    onVideoFrame The callback triggered when the media player throws out video frame data, with additional information for the video frame.
    onAudioFrame The callback triggered when the media player throws out audio frame data.
    onBlockBegin The callback triggered when the media player is about to throw the block data of the media resource.
    onBlockData The callback triggered when the media player throws the block data of the media resource.

    audioEffectPlayer

    Method Description
    createAudioEffectPlayer Creates a audio effect player instance.
    destroyAudioEffectPlayer Destroys a audio effect player instance.
    setEventHandler Set audio effect player event handler.
    start Start playing audio effect.
    stop Stop playing audio effect.
    pause Pause playing audio effect.
    resume Resume playing audio effect.
    stopAll Stop playing all audio effect.
    pauseAll Pause playing all audio effect.
    resumeAll Resume playing all audio effect.
    seekTo Set the specified playback progress.
    setVolume Set volume for a single audio effect. Both the local play volume and the publish volume are set.
    setPlayVolume Set local play volume for a single audio effect.
    setPublishVolume Set publish volume for a single audio effect.
    setVolumeAll Set volume for all audio effect. Both the local play volume and the publish volume are set.
    setPlayVolumeAll Set local play volume for all audio effect.
    setPublishVolumeAll Set publish volume for all audio effect.
    setPlaySpeed Set the playback speed for a given audio effect. Both the local play speed and the publish speed are set. (separate settings are not supported).
    getTotalDuration Get the total duration of the specified audio effect resource.
    getCurrentProgress Get current playback progress.
    loadResource Load audio effect resource.
    unloadResource Unload audio effect resource.
    updatePosition Update the position of the audio effect player (audio source).
    getIndex Get audio effect player index.
    onAudioEffectPlayStateUpdate Audio effect playback state callback.

    record

    Method Description
    startRecordingCapturedData Starts to record and directly save the data to a file.
    stopRecordingCapturedData Stops recording locally captured audio or video.
    setDataRecordEventHandler Sets up the event callback handler for data recording.
    onCapturedDataRecordStateUpdate The callback triggered when the state of data recording (to a file) changes.
    onCapturedDataRecordProgressUpdate The callback to report the current recording progress.

    device

    Method Description
    muteMicrophone Mutes or unmutes the microphone.
    isMicrophoneMuted Checks whether the microphone is muted.
    muteSpeaker Mutes or unmutes the audio output speaker.
    isSpeakerMuted Checks whether the audio output speaker is muted.
    useAudioDevice Chooses to use the specified audio device.
    setAudioDeviceMode Set the audio device mode.
    enableAudioCaptureDevice Enables or disables the audio capture device.
    getAudioRouteType get current audio route type.
    setAudioRouteToSpeaker Whether to use the built-in speaker to play audio.
    enableCamera Turns on/off the camera.
    enableCamera Turns on/off the camera (for the specified channel).
    useFrontCamera Switches to the front or the rear camera.
    useFrontCamera Switches to the front or the rear camera (for the specified channel).
    isCameraFocusSupported Whether the camera supports focusing.
    setCameraFocusMode Set the camera focus mode.
    setCameraFocusPointInPreview Set the focus point in the preview view.
    setCameraExposureMode Set the camera exposure mode.
    setCameraExposurePointInPreview Set the exposure point in the preview view.
    setCameraExposureCompensation Set the camera exposure compensation value.
    setCameraExposureCompensation Set the camera exposure compensation value and support spedifying the publish channel.
    setCameraZoomFactor Set the zoom factor of the camera. Every time the camera is restarted, the camera zoom factor will return to the initial value (1.0).
    setCameraZoomFactor Set the zoom factor of the camera and support specifying the publish channel. Every time the camera is restarted, the camera zoom factor will return to the initial value (1.0).
    getCameraMaxZoomFactor Get the maximum zoom factor of the camera.
    getCameraMaxZoomFactor Get the maximum zoom factor of the camera and support specifying the publish channel.
    enableCameraAdaptiveFPS Enable camera adaptive frame rate.
    startSoundLevelMonitor Starts sound level monitoring.
    startSoundLevelMonitor Starts sound level monitoring. Support setting the listening interval.
    startSoundLevelMonitor Starts sound level monitoring. Support enable some advanced feature.
    stopSoundLevelMonitor Stops sound level monitoring.
    startAudioSpectrumMonitor Starts audio spectrum monitoring.
    startAudioSpectrumMonitor Starts audio spectrum monitoring. Support setting the listening interval.
    stopAudioSpectrumMonitor Stops audio spectrum monitoring.
    enableHeadphoneMonitor Enables or disables headphone monitoring.
    setHeadphoneMonitorVolume Sets the headphone monitor volume.
    enableMixEnginePlayout Enable or disable mix SDK playout to stream publishing.
    startAudioVADStableStateMonitor Start audio VAD stable state monitoring.
    startAudioVADStableStateMonitor Start audio VAD stable state monitoring, and the monitoring period can be set.
    stopAudioVADStableStateMonitor Stop audio VAD stable state monitoring.
    onCapturedSoundLevelUpdate The local captured audio sound level callback.
    onCapturedSoundLevelInfoUpdate The local captured audio sound level callback, supported vad.
    onRemoteSoundLevelUpdate The remote playing streams audio sound level callback.
    onRemoteSoundLevelInfoUpdate The remote playing streams audio sound level callback, supported vad.
    onCapturedAudioSpectrumUpdate The local captured audio spectrum callback.
    onRemoteAudioSpectrumUpdate The remote playing streams audio spectrum callback.
    onLocalDeviceExceptionOccurred The callback triggered when a local device exception occurred.
    onRemoteCameraStateUpdate The callback triggered when the state of the remote camera changes.
    onRemoteMicStateUpdate The callback triggered when the state of the remote microphone changes.
    onRemoteSpeakerStateUpdate The callback triggered when the state of the remote speaker changes.
    onAudioRouteChange Callback for device's audio route changed.
    onAudioVADStateUpdate Callback for audio VAD stable state update.

    customVideoIO

    Method Description
    enableCustomVideoRender Enables or disables custom video rendering.
    setCustomVideoRenderHandler Sets up the event callback handler for custom video rendering.
    enableCapturedVideoCustomVideoRender Enables or disables captured video to custom video rendering.
    enableRemoteVideoCustomVideoRender Enables or disables remote playback video to custom video rendering.
    enableCustomVideoCapture Enables or disables custom video capture.
    enableCustomVideoCapture Enables or disables custom video capture (for the specified channel).
    setCustomVideoCaptureHandler Sets the event callback handler for custom video capture.
    sendCustomVideoCaptureRawData Sends the video frames (Raw Data) produced by custom video capture to the SDK.
    sendCustomVideoCaptureRawData Sends the video frames (Raw Data) produced by custom video capture to the SDK (for the specified channel).
    sendCustomVideoCaptureTextureData Sends the video frames (Texture Data) produced by custom video capture to the SDK.
    sendCustomVideoCaptureTextureData Sends the video frames (Texture Data) produced by custom video capture to the SDK (for the specified channel).
    getCustomVideoCaptureSurfaceTexture Gets the SurfaceTexture instance from main channel.
    getCustomVideoCaptureSurfaceTexture Gets the SurfaceTexture instance (for the specified channel).
    sendCustomVideoCaptureEncodedData Sends the video frames (Encoded Data) produced by custom video capture to the SDK.
    sendCustomVideoCaptureEncodedData Sends the video frames (Encoded Data) produced by custom video capture to the SDK (for the specified channel).
    setCustomVideoCaptureFillMode Sets the video fill mode of custom video capture.
    setCustomVideoCaptureFillMode Sets the video fill mode of custom video capture (for the specified channel).
    setCustomVideoCaptureFlipMode Sets the video flip mode of custom video capture (for the specified channel). This function takes effect only if the custom video buffer type is Texture2D.
    setCustomVideoCaptureFlipMode Sets the video flip mode of custom video capture (for the specified channel). This function takes effect only if the custom video buffer type is Texture2D.
    setCustomVideoCaptureRotation Sets the video rotation of custom video capture (for the specified channel).
    setCustomVideoCaptureDeviceState Sets device state of custom video capture (for the specified channel).
    setCustomVideoCaptureTransformMatrix Sets the video transform matrix of custom video capture (for the specified channel).
    setCustomVideoCaptureRegionOfInterest Set the region of interest (ROI) for encoder of custom video capture (for the specified channel).
    resetCustomVideoCaptureTextureContext Reset the texture-related context cached by the SDK, such as EglContext. This function only takes effect when the custom video buffer type is Texture2D or TextureExternalOES.
    onStart Customize the notification of the start of video capture.
    onStop Customize the notification of the end of the collection.
    onEncodedDataTrafficControl When network changes are detected during custom video capture, the developer is notified that traffic control is required, and the encoding configuration is adjusted according to the recommended parameters of the SDK.
    onCapturedVideoFrameRawData When custom video rendering is enabled, the original video frame data collected by the local preview is called back.
    onRemoteVideoFrameRawData When custom video rendering is enabled, the remote end pulls the original video frame data to call back, and distinguishes different streams by streamID.
    onRemoteVideoFrameEncodedData Custom video rendering remote playing stream video frame undecoded data callback.
    enableCustomVideoProcessing Enables or disables custom video processing.
    enableCustomVideoProcessing Enables or disables custom video processing, and support specifying the publish channel.
    setCustomVideoProcessHandler Sets up the event callback handler for custom video processing.
    sendCustomVideoProcessedTextureData Send the [Texture] type video data after the pre-processing of the custom video to the SDK.
    sendCustomVideoProcessedTextureData Send the [Texture] type video data after the pre-processing of the custom video to the SDK (for the specified channel).
    sendCustomVideoProcessedTextureData Send the [Texture] type video data after the pre-processing of the custom video to the SDK (for the specified channel), and support specified data usage.
    onStart The SDK informs the developer that it is about to start custom video processing.
    onStop The SDK informs the developer to stop custom video processing.
    getCustomVideoProcessOutputSurfaceTexture Get SurfaceTexture for output data.
    getCustomVideoProcessOutputSurfaceTexture Get SurfaceTexture for output data (for the specified channel).
    onCapturedUnprocessedRawData Call back when the original video data is obtained.
    onCapturedUnprocessedTextureData Call back when the original video data of type [Texture] is obtained.
    getCustomVideoProcessInputSurfaceTexture When the developer chooses the SurfaceTexture video pre-processing type, the SurfaceTexture used to input the original video data is obtained through this interface and passed to the SDK.

    customAudioIO

    Method Description
    enableCustomAudioCaptureProcessing Enable local collection and custom audio processing(before ear return).
    enableCustomAudioCaptureProcessingAfterHeadphoneMonitor Turn on local collection and custom audio processing (after ear return).
    enableAlignedAudioAuxData Enable feature of throwing audio aux frames which aligned with accompany.
    enableBeforeAudioPrepAudioData Enable the feature of throwing audio data before SDK internal audio preprocessing.
    enableCustomAudioRemoteProcessing Enable custom audio processing for remote playing stream.
    enableCustomAudioPlaybackProcessing Enable custom audio processing for SDK playback audio data.
    setCustomAudioProcessHandler Set up callback handler for custom audio processing.
    startAudioDataObserver Enable audio data observering.
    stopAudioDataObserver Disable audio data observering.
    setAudioDataHandler Sets up the event callback handler for receiving audio data.
    enableCustomAudioIO Enables the custom audio I/O function.
    enableCustomAudioIO Enables the custom audio I/O function (for the specified channel), support PCM, AAC format data.
    sendCustomAudioCaptureAACData Sends AAC audio data produced by custom audio capture to the SDK (for the specified channel).
    sendCustomAudioCapturePCMData Sends PCM audio data produced by custom audio capture to the SDK.
    sendCustomAudioCapturePCMData Sends PCM audio data produced by custom audio capture to the SDK (for the specified channel).
    fetchCustomAudioRenderPCMData Fetches PCM audio data of the remote stream from the SDK for custom audio rendering.
    onProcessCapturedAudioData Custom audio processing local captured PCM audio frame callback.
    onProcessCapturedAudioDataAfterUsedHeadphoneMonitor Custom audio processing local captured PCM audio frame callback after used headphone monitor.
    onAlignedAudioAuxData Aligned audio aux frames callback.
    onBeforeAudioPrepAudioData Audio data callback before SDK internal audio preprocessing.
    onProcessRemoteAudioData Custom audio processing remote playing stream PCM audio frame callback.
    onProcessPlaybackAudioData Custom audio processing SDK playback PCM audio frame callback.
    onCapturedAudioData The callback for obtaining the audio data captured by the local microphone.
    onPlaybackAudioData The callback for obtaining the audio data of all the streams playback by SDK.
    onMixedAudioData Callback to get the audio data played by the SDK and the audio data captured by the local microphone. The audio data is the data mixed by the SDK.
    onPlayerAudioData The callback for obtaining the audio data of each stream.

    mediaDataPublisher

    Method Description
    createMediaDataPublisher Creates a media data publisher instance.
    destroyMediaDataPublisher Destroys a media data publisher instance.
    setEventHandler Set event callback handler for the media data publisher.
    addMediaFilePath Add media file to the publish queue. Currently, only mp4 / m4a / aac files are supported, and special conversion is required.
    reset Clear all the status in this media data publisher, so that it can be restarted next time.
    setVideoSendDelayTime Set the delay time of video playback.
    seekTo Specify the starting point of the current video file publishing.
    getTotalDuration Get the total duration of the current file.
    getCurrentDuration Get the playing progress of the current file.
    getIndex Get the channel index of the media data publisher.
    onMediaDataPublisherFileOpen The event callback of the media data publisher opening a media file.
    onMediaDataPublisherFileClose The event callback of the media data publisher closing a media file.
    onMediaDataPublisherFileDataBegin The event callback that the media data publisher has read data from the media file.

    utilities

    Method Description
    startPerformanceMonitor Start system performance monitoring.
    stopPerformanceMonitor Stop system performance monitoring.
    startNetworkProbe Start network probe.
    stopNetworkProbe Stop network probe.
    testNetworkConnectivity Test network connectivity.
    startNetworkSpeedTest Start network speed test.
    startNetworkSpeedTest Start network speed test. Support set speed test interval。
    stopNetworkSpeedTest Stop network speed test.
    getNetworkTimeInfo Obtain synchronization network time information.
    startDumpData Dump audio and video data.
    stopDumpData Stop dumping data.
    uploadDumpData Upload dumped data to the ZEGO server.
    removeDumpData Remove dumped data.
    onPerformanceStatusUpdate The system performance status callback. (Note: Due to Android system limitations, CPU usage cannot be obtained)
    onNetworkModeChanged Network mode changed callback.
    onNetworkSpeedTestError Network speed test error callback.
    onNetworkSpeedTestQualityUpdate Network speed test quality callback.
    onNetworkQuality The network quality callback of users who are publishing in the room.
    onNetworkTimeSynchronized Successful callback of network time synchronization.
    onRequestDumpData Request to dump data.
    onRequestUploadDumpData Request to dump data.
    onStartDumpData Callback when starting to dump data.
    onStopDumpData Callback when stopping to dump data.
    onUploadDumpData Callback after uploading the dump data.

    rangeAudio

    Method Description
    createRangeAudio Creates a range audio instance.
    destroyRangeAudio Destroys a range audio instance.
    setEventHandler set range audio event handler.
    setAudioReceiveRange Set the maximum range of received audio.
    setAudioReceiveRange Set the configuration of the audio receiving range.
    setPositionUpdateFrequency Set the frequency of real-time update locations within the SDK.
    setRangeAudioVolume Set range voice volume.
    setStreamVocalRange Set the sound range for the stream.
    setStreamVocalRange Set the sound range for the stream.
    updateStreamPosition Update the location of the flow.
    updateSelfPosition Update self position and orentation.
    updateAudioSource Add or update audio source position information.
    enableSpatializer Turn the 3D spatial sound on or off.
    enableMicrophone Turn the microphone on or off.
    enableSpeaker Turn the speaker on or off.
    setRangeAudioMode Set range audio mode.
    setRangeAudioCustomMode Set range audio custom mode.
    setTeamID Set team ID.
    muteUser Whether can receive the audio data of the specified user.
    onRangeAudioMicrophoneStateUpdate Range audio microphone state callback.

    CopyrightedMusic

    Method Description
    createCopyrightedMusic Creates a copyrighted music instance.
    destroyCopyrightedMusic Destroys a copyrighted music instance.
    setEventHandler set copyrighted music event handler.
    initCopyrightedMusic Initialize the copyrighted music module.
    getCacheSize Get cache size.
    clearCache Clear cache.
    sendExtendedRequest Send extended feature request.
    getLrcLyric Get lyrics in lrc format.
    getLrcLyric Get lyrics in lrc format.
    getKrcLyricByToken Get lyrics in krc format.
    requestResource Request music resource.
    requestResource Request music resource.
    getSharedResource Get shared music resource.
    getSharedResource Get shared music resource.
    download Download music resource.
    cancelDownload Cancel download of music resource.
    queryCache Query the resource's cache is existed or not.
    queryCache Query the resource's cache is existed or not.
    getDuration Get the playing time of a song or accompaniment file.
    setScoringLevel Set the difficulty level of scoring.
    startScore Start scoring.
    pauseScore Pause scoring.
    resumeScore Resume scoring.
    stopScore Stop scoring.
    resetScore Reset scoring.
    getPreviousScore Get the score of the previous sentence.
    getAverageScore Get average score.
    getTotalScore Get total score .
    getFullScore Get full score .
    getStandardPitch Get standard pitch data.
    getCurrentPitch Get real-time pitch data.
    onDownloadProgressUpdate Callback for download song or accompaniment progress rate.
    onCurrentPitchValueUpdate Real-time pitch line callback.

    RangeScene

    Method Description
    setEventHandler set range scene stream event handler.
    setReceiveRange Set the receiving range of audio and video streams.
    setReceiveRange Set the receiving range of audio and video streams.
    enableRangeSpatializer Turn 3D spatial sound on or off.
    mutePlayAudio Set whether to receive the audio data of the specified user.
    mutePlayVideo Set whether to receive the video data of the specified user.
    onUserStreamStateUpdate The callback notification of local user play other users' stream state change.
    onUserMicUpdate User microphone state change callback.
    onUserCameraUpdate User camera state change callback.
    onUserSpeakerUpdate User speaker state change callback.
    setEventHandler set range scene team event handler.
    joinTeam Join team.
    leaveTeam Leave team.
    onTeamStateUpdate The callback triggered when the team connection state changes.
    onTeamMemberUpdate The callback triggered when the number of other users in the team increases or decreases.
    setEventHandler set range scene item event handler.
    createItem Create item.
    destroyItem Destroy item.
    bindItem Bind item.
    unbindItem Unbind item.
    updateItemStatus Update item status.
    updateItemCommand Update item status.
    onItemEnterView Callback notification when item enters the current user's field of view.
    onItemLeaveView Callback notification when item leave the current user's field of view.
    onItemBindUpdate Item binding user change callback notification.
    onItemUnbindUpdate Item unbind user change callback notification.
    onItemStatusUpdate Item state update callback.
    onItemCommandUpdate Item command update callback.
    createRangeScene Create a range scene instance object.
    destroyRangeScene Destroy a range scene instance object.
    getRangeSceneStream Get a range scene stream instance.
    getRangeSceneTeam Get a range scene team instance.
    getRangeSceneItem Get a range scene item instance.
    getRangeSceneHandle Get range scene instance handle.
    setEventHandler set range scene event handler.
    loginScene Logs in to a scene.
    logoutScene Logs out of a scene.
    updateUserStatus Update user status.
    updateUserCommand Update user status.
    updateUserPosition Update user position.
    getUserCount Get user count in scene.
    getUserListInView Get user list in view.
    sendCustomCommand Send custom command.
    renewToken Renew token.
    setStreamConfig Set range scene stream config.
    onSceneStateUpdate The callback triggered when the scene connection state changes.
    onEnterView Callback notification when another user enters the current user's field of view.
    onLeaveView Callback notification when other users leave the current user's field of view.
    onUserStatusUpdate User state update callback.
    onUserCommandUpdate User command update callback.
    onCustomCommandUpdate Custom command update callback.
    onSceneTokenWillExpire Callback notification that scene Token authentication is about to expire.

    ScreenCapture

    Method Description
    startScreenCapture Start screen capture.
    startScreenCapture Start screen capture.
    stopScreenCapture Stop screen capture.
    updateScreenCaptureConfig Update screen capture parameter configuration.
    onScreenCaptureExceptionOccurred The callback triggered when a screen capture source exception occurred

    deprecated_api

    Method Description
    enableBeautify [Deprecated] Enables or disables the beauty features for the main publish channel. Deprecated since 2.16.0, please use the [enableEffectsBeauty] function instead.
    enableBeautify [Deprecated] Enables or disables the beauty features for the specified publish channel. Deprecated since 2.16.0, please use the [enableEffectsBeauty] function instead.
    setBeautifyOption [Deprecated] Set beautify option. Deprecated since 2.16.0, please use the [setEffectsBeautyParam] function instead.
    setBeautifyOption [Deprecated] Set beautify option. Deprecated since 2.16.0, please use the [setEffectsBeautyParam] function instead.
    createEngine [Deprecated] Create ZegoExpressEngine singleton object and initialize SDK. Deprecated since 2.14.0, please use the method with the same name without [isTestEnv] parameter instead. Please refer to Testing environment deprecation for more details.
    requestSong [Deprecated] Request a song. Deprecated since 3.0.2, please use the [requestResource] function instead.
    requestAccompaniment [Deprecated] Request accompaniment. Deprecated since 3.0.2, please use the [requestResource] function instead.
    requestAccompanimentClip [Deprecated] Request accompaniment clip. Deprecated since 3.0.2, please use the [requestResource] function instead.
    getMusicByToken [Deprecated] Get a song or accompaniment. Deprecated since 3.0.2, please use the [getSharedResource] function instead.
    getLrcLyric [Deprecated] Get lyrics in lrc format. Deprecated since 3.2.1, please use the method with the same name with [vendorID] parameter instead.
    queryCache [Deprecated] Query the resource's cache is existed or not. Deprecated since 3.2.1, please use the method with the same name with [vendorID] parameter instead.
    queryCache [Deprecated] Query the resource's cache is existed or not. Deprecated since 3.9.0, please use the method with the same name with [config] parameter instead.
    Page Directory