logo
On this page

Function Overview


ZEGO Express SDKs provide rich APIs for you to quickly build audio/video calling and live streaming capabilities into your applications based on ZEGO's cloud live streaming platform. With a powerful audio/video processing engine and a global real-time network, the platform is providing high-quality and reliable cloud audio/video streaming services to businesses around the world.

ZEGO Express SDKs are available for all major platforms, including Android, iOS, Mac, Windows, and Web.

MethodDescription
createEngineWithProfileCreate ZegoExpressEngine singleton object and initialize SDK.
destroyEngineDestroy the ZegoExpressEngine singleton object and deinitialize the SDK.
setEngineConfigSet advanced engine configuration.
setLogConfigSet log configuration.
setLocalProxyConfigSet local proxy config.
setCloudProxyConfigSet cloud proxy config.
setLicenseSet license auth.
setRoomModeSet room mode.
setGeoFenceSet Geo Fence.
getVersionGets the SDK's version number.
isFeatureSupportedQuery whether the current SDK supports the specified feature.
setRoomScenarioSet room scenario.
uploadLogUploads logs to the ZEGO server.
submitLogUploads logs to the ZEGO server.
enableDebugAssistantEnable the debug assistant. Note, do not enable this feature in the online version! Use only during development phase!
callExperimentalAPICall the experimental API.
onDebugErrorThe callback for obtaining debugging error information.
onApiCalledResultMethod execution result callback
onEngineStateUpdateThe callback triggered when the audio/video engine state changes.
onRecvExperimentalAPIExperimental API callback
onFatalErrorThe callback that triggered a fatal error, causing the SDK to malfunction and unable to function properly.

Room functions

MethodDescription
loginRoomLog 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.
logoutRoomExit the room of the specified room ID with callback.
switchRoomSwitch the room with advanced room configurations.
renewTokenRenew token.
setRoomExtraInfoSet room extra information.
getRoomStreamListGet room stream list.
onRoomStateUpdateNotification of the room connection state changes.
onRoomStateChangedNotification of the room connection state changes, including specific reasons for state change.
onRoomUserUpdateThe callback triggered when the number of other users in the room increases or decreases.
onRoomOnlineUserCountUpdateThe callback triggered every 30 seconds to report the current number of online users.
onRoomStreamUpdateThe callback triggered when the number of streams published by the other users in the same room increases or decreases.
onRoomStreamExtraInfoUpdateThe callback triggered when there is an update on the extra information of the streams published by other users in the same room.
onRoomExtraInfoUpdateThe callback triggered when there is an update on the extra information of the room.
onRoomTokenWillExpireCallback notification that room Token authentication is about to expire.

Stream Publishing Functions

MethodDescription
startPublishingStreamStarts publishing a stream. Support multi-room mode.
stopPublishingStreamStops publishing a stream (for the specified channel).
setStreamExtraInfoSets the extra information of the stream being published for the specified publish channel.
startPreviewStarts/Updates the local video preview (for the specified channel).
stopPreviewStops the local preview (for the specified channel).
setVideoConfigSets up the video configurations (for the specified channel).
getVideoConfigGets the current video configurations (for the specified channel).
setPublishDualStreamConfigSet dual stream config.
setVideoMirrorModeSets the video mirroring mode (for the specified channel).
setAppOrientationSets the video orientation (for the specified channel).
setAudioConfigSets up the audio configurations for the specified publish channel.
getAudioConfigGets the current audio configurations from the specified publish channel.
setPublishStreamEncryptionKeySet encryption key for the publishing stream for the specified publish channel.
takePublishStreamSnapshotTake a snapshot of the publishing stream for the specified publish channel.
mutePublishStreamAudioStops or resumes sending the audio part of a stream for the specified channel.
mutePublishStreamVideoStops or resumes sending the video part of a stream for the specified channel.
setStreamAlignmentPropertyEnable or disable the stream precision alignment function.
enableTrafficControlEnables or disables the traffic control for the specified publish channel.
setMinVideoBitrateForTrafficControlSets the minimum video bitrate for traffic control for the specified publish channel.
setMinVideoFpsForTrafficControlSets the minimum video frame rate threshold for traffic control.
setMinVideoResolutionForTrafficControlSets the minimum video resolution threshold for traffic control.
setTrafficControlFocusOnSet the factors of concern that trigger traffic control for the specified publish channel.
setCaptureVolumeSets the audio recording volume for stream publishing.
setAudioCaptureStereoModeSet audio capture stereo mode.
addPublishCdnUrlAdds a target CDN URL to which the stream will be relayed from ZEGO RTC server.
removePublishCdnUrlDeletes the specified CDN URL, which is used for relaying streams from ZEGO RTC server to CDN.
enablePublishDirectToCDNWhether to directly push to CDN (without going through the ZEGO RTC server), for the specified channel.
setPublishWatermarkSets up the stream watermark before stream publishing (for the specified channel).
setSEIConfigSet the Supplemental Enhancement Information type.
sendSEISends Supplemental Enhancement Information to the specified publish channel.
sendAudioSideInfoSend audio side information.
enableHardwareEncoderEnables or disables hardware encoding.
setCapturePipelineScaleModeSets 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.
setDummyCaptureImagePathSet the path of the static picture would be published when the camera is closed.
setDummyCaptureImageParamsSet the params of the static picture would be published when the camera is closed.
enableH265EncodeFallbackWhether to enable H.265 encoding to automatically downgrade to H.264 encoding.
isVideoEncoderSupportedWhether the specified video encoding type and implementation are supported.
getVideoEncoderSupportedWhether the specified video encoding type and implementation are supported.
setAppOrientationModeSet the orientation mode of the video.
setLowlightEnhancementSet low light enhancement.
setLowlightEnhancementParamsSet low light enhancement params.
setVideoDenoiseParamsSet video denoise params.
setVideoSourceSet a video capture instance as video capture source for the specified channel.
setAudioSourceSet audio capture source with audio mix config.
enableVideoObjectSegmentationEnable video object segmentation.
enableAlphaChannelVideoEncoderEnable video encoder alpha channel support.
enableVideoEncoderEnhancementEnable video encoder enhancement.
setCameraStabilizationModeSet the camera stabilization mode.
enableAuxBgmBalanceTurn on or off the adaptive mode to adjust the volume of the human voice according to the volume of the BGM.
enableFaceDetectionTurn on or off the face detection.
onPublisherStateUpdateThe callback triggered when the state of stream publishing changes.
onPublisherQualityUpdateCallback for current stream publishing quality.
onPublisherCapturedAudioFirstFrameThe callback triggered when the first audio frame is captured.
onPublisherCapturedVideoFirstFrameThe callback triggered when the first video frame is captured.
onPublisherSendAudioFirstFrameThe callback triggered when the first audio frame is sent.
onPublisherSendVideoFirstFrameThe callback triggered when the first video frame is sent.
onPublisherRenderVideoFirstFrameThe callback triggered when the first video frame is rendered.
onPublisherVideoSizeChangedThe callback triggered when the video capture resolution changes.
onPublisherRelayCDNStateUpdateThe callback triggered when the state of relayed streaming to CDN changes.
onPublisherVideoEncoderChangedThe callback triggered when the video encoder changes in publishing stream.
onPublisherStreamEventThe callback triggered when publishing stream.
onVideoObjectSegmentationStateChangedThe video object segmentation state changed.
onPublisherLowFpsWarningVideo encoding low frame rate warning.
onPublisherDummyCaptureImagePathErrorThe notification for setting the path of the static image displayed when the camera is turned off is incorrect.
onPublisherFaceDetectInfoFace detection information update notification.

Stream Playing Functions

MethodDescription
startPlayingStreamStarts playing a stream from ZEGO RTC server or from third-party CDN. Support multi-room mode.
switchPlayingStreamSwitch from playing a certain stream to playing another stream.
stopPlayingStreamStops playing a stream.
setPlayStreamDecryptionKeySet decryption key for the playing stream.
setPlayStreamCrossAppInfoSet up cross App playing stream information.
takePlayStreamSnapshotTake a snapshot of the playing stream.
setPlayVolumeSets the stream playback volume.
setAllPlayStreamVolumeSets the all stream playback volume.
setPlayStreamVideoTypeSet play video stream type.
setPlayStreamBufferIntervalRangeSet the adaptive adjustment interval range of the buffer for playing stream.
setPlayStreamFocusOnSet the weight of the pull stream priority.
mutePlayStreamAudioWhether the pull stream can receive the specified audio data.
mutePlayStreamVideoWhether the pull stream can receive the specified video data.
muteAllPlayStreamAudioCan the pull stream receive all audio data. (When set to true, calling [mutePlayStreamAudio] will not take effect)
muteAllPlayAudioStreamsCan the pull stream receive all audio data.
muteAllPlayStreamVideoCan the pull stream receive all video data. (When set to true, calling [mutePlayStreamVideo] will not take effect)
muteAllPlayVideoStreamsCan the pull stream receive all video data.
setPlayStreamDecodeFrameModeset play stream decode mode.
enableHardwareDecoderEnables or disables hardware decoding.
enableCheckPocEnables or disables frame order detection.
isVideoDecoderSupportedWhether the specified video decoding format is supported.
getVideoDecoderSupportedWhether the specified video decoding type and implementation are supported.
setPlayStreamsAlignmentPropertySet the play stream alignment properties.
enableVideoSuperResolutionEnable video super resolution.
initVideoSuperResolutionInit video super resolution.
uninitVideoSuperResolutionUninit video super resolution.
updatePlayingCanvasUpdate playing canvas.
setPlayingCanvasSetting up playing canvas.
onPlayerStateUpdateThe callback triggered when the state of stream playing changes.
onPlayerSwitchedSwitch playing stream callback.
onPlayerQualityUpdateCallback for current stream playing quality.
onPlayerMediaEventThe callback triggered when a media event occurs during streaming playing.
onPlayerRecvAudioFirstFrameThe callback triggered when the first audio frame is received.
onPlayerRecvVideoFirstFrameThe callback triggered when the first video frame is received.
onPlayerRenderVideoFirstFrameThe callback triggered when the first video frame is rendered.
onPlayerRenderCameraVideoFirstFrameCalls back when the stream playing end renders the first frame of the video from the remote camera.
onPlayerRenderMultiViewFirstFrameWhen multiple playing canvas are set, the callback will be triggered after one view renders the first frame of the video.
onPlayerVideoSizeChangedThe callback triggered when the stream playback resolution changes.
onPlayerRecvSEIThe callback triggered when Supplemental Enhancement Information is received.
onPlayerRecvMediaSideInfoThe callback triggered when Supplemental Enhancement Information is received synchronously.
onPlayerRecvAudioSideInfoReceive the audio side information content of the remote stream.
onPlayerLowFpsWarningPlaying stream low frame rate warning.
onPlayerStreamEventThe callback triggered when playing stream.
onPlayerVideoSuperResolutionUpdatePlaying stream video super resolution enabled state changes.

Instant Messaging Functions

MethodDescription
createRealTimeSequentialDataManagerCreate the real time sequential data manager instance
destroyRealTimeSequentialDataManagerDestroy the real time sequential data manager instance
startBroadcastingStart broadcasting real-time sequential data stream.
stopBroadcastingStop broadcasting real-time sequential data stream.
sendRealTimeSequentialDataSend real-time sequential data to the broadcasting stream ID.
startSubscribingStart subscribing real-time sequential data stream.
stopSubscribingStop subscribing real-time sequential data stream.
getIndexGet real-time sequential data manager index.
onReceiveRealTimeSequentialDataCallback for receiving real-time sequential data.
sendBroadcastMessageSends a Broadcast Message.
sendBarrageMessageSends a Barrage Message (bullet screen) to all users in the same room, without guaranteeing the delivery.
sendCustomCommandSends a Custom Command to the specified users in the same room.
sendTransparentMessageSends a transparent message in room.
onRecvRoomTransparentMessageThe callback triggered when Barrage Messages are received.
onIMRecvBroadcastMessageThe callback triggered when Broadcast Messages are received.
onIMRecvBarrageMessageThe callback triggered when Barrage Messages are received.
onIMRecvCustomCommandThe callback triggered when a Custom Command is received.

Stream Mixing Functions

MethodDescription
startMixerTaskStarts a stream mixing task.
stopMixerTaskStops a stream mixing task.
startAutoMixerTaskStarts an auto stream mixing task.
stopAutoMixerTaskStops an auto stream mixing task.
onMixerRelayCDNStateUpdateThe callback triggered when the state of relayed streaming of the mixed stream to CDN changes.
onMixerSoundLevelUpdateThe callback triggered when the sound level of any input stream changes in the stream mixing process.
onAutoMixerSoundLevelUpdateThe callback triggered when the sound level of any input stream changes in the auto stream mixing process.

Audio and Video Preprocessing Functions

MethodDescription
enableAECWhether to enable acoustic echo cancellation (AEC).
enableHeadphoneAECWhether to turn on acoustic echo cancellation (AEC) when using the headphone.
setAECModeSets the acoustic echo cancellation (AEC) mode.
enableAGCEnables or disables automatic gain control (AGC).
enableANSEnables or disables active noise suppression (ANS, aka ANC).
enableTransientANSEnables or disables transient noise suppression.
setANSModeSets the automatic noise suppression (ANS) mode.
enableSpeechEnhanceEnables or disables speech enhancement.
enableAudioMixingEnables or disables audio mixing function.
muteLocalAudioMixingMute or resume local playback of the mixing audio.
setAudioMixingVolumeSets the audio mixing output volume for either local playback or the stream to published.
startEffectsEnvEnable the Effects beauty environment.
stopEffectsEnvDisable the Effects beauty environment.
enableEffectsBeautyEnables or disables the beauty effect.
setEffectsBeautyParamSet beautify param.
setAudioEqualizerGainSet the sound equalizer (EQ).
setVoiceChangerPresetSetting up the voice changer via preset enumeration.
setVoiceChangerParamSetting up the specific voice changer parameters.
setReverbPresetSetting up the reverberation via preset enumeration.
setReverbAdvancedParamSetting up the specific reverberation parameters.
setReverbEchoParamSetting up the specific reverberation echo parameters.
enableVirtualStereoEnable or disable the virtual stereo effect when publishing stream.
enablePlayStreamVirtualStereoEnable or disable the virtual stereo effect when playing stream.
setElectronicEffectsTurn on or off the electronic sound effect.
enableColorEnhancementEnable color enhancement.

MediaPlayer Functions

MethodDescription
createMediaPlayerCreates a media player instance.
destroyMediaPlayerDestroys a media player instance.
loadResourceLoad local or network media resource.
loadResourceWithPositionLoad local or network media resource and specify the start position.
loadResourceFromMediaDataLoad binary audio resource.
loadCopyrightedMusicResourceWithPositionLoad copyrighted music resource.
loadResourceWithConfigLoad local or network media resource with config.
startStart playing.
stopStop playing.
pausePause playing.
resumeResume playing.
seekToSet the specified playback progress.
enableRepeatWhether to repeat playback.
setPlaySpeedSet the speed of play.
enableAuxWhether to mix the player's sound into the stream being published.
muteLocalWhether to play locally silently.
setPlayerCanvasSet the view of the player playing video.
setVolumeSet mediaplayer volume. Both the local play volume and the publish volume are set.
setPlayVolumeSet mediaplayer local playback volume.
setPublishVolumeSet mediaplayer publish volume.
setProgressIntervalSet playback progress callback interval.
getPlayVolumeGets the current local playback volume of the mediaplayer, the range is 0 ~ 200, with the default value of 60.
getPublishVolumeGets the current publish volume of the mediaplayer, the range is 0 ~ 200, with the default value of 60.
getTotalDurationGet the total progress of your media resources.
getCurrentProgressGet current playing progress.
getCurrentRenderingProgressGet current rendering progress.
getAudioTrackCountGet the number of audio tracks of the playback file.
setAudioTrackIndexSet the audio track of the playback file.
setAudioTrackModeSet the audio track mode of the player.
setAudioTrackPublishIndexSet the audio track for the media file to be publish.
enableVoiceChangerEnable voice changer, set up the specific voice changer parameters.
getCurrentStateGet the current playback status.
getIndexGet media player index.
enableAudioDataWhether to audio data playback.
enableVideoDataWhether to video data playback.
enableBlockDataWhether to throw block data of the media resource.
takeSnapshotTake a screenshot of the current playing screen of the media player.
enableAccurateSeekEnable accurate seek and set relevant attributes.
setNetWorkResourceMaxCacheSet the maximum cache duration and cache data size of web materials.
getNetWorkResourceCacheGet the playable duration and size of the cached data of the current network material cache queue
setNetWorkBufferThresholdUse 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
enableSoundLevelMonitorWhether to enable sound level monitoring.
enableFrequencySpectrumMonitorWhether to enable frequency spectrum monitoring.
setActiveAudioChannelSet the playback channel.
clearViewClears the last frame of the playback control that remains on the control after playback ends.
getMediaInfoGet meida information such as video resolution from media file.
updatePositionUpdate the position of the media player (audio source).
setHttpHeaderSet http headers.
setPlayMediaStreamTypeSet play media stream type.
enableLiveAudioEffectEnable live audio effect.
enableLocalCacheEnable local caching of http/https network resources.
enableViewMirrorEnable the view mirror.
getPlaybackStatisticsGet playback statistics.
onMediaPlayerStateUpdateMediaPlayer playback status callback.
onMediaPlayerNetworkEventThe callback triggered when the network status of the media player changes.
onMediaPlayerPlayingProgressThe callback to report the current playback progress of the media player.
onMediaPlayerRenderingProgressThe callback to report the current rendering progress of the media player.
onMediaPlayerVideoSizeChangedThe callback triggered when when the resolution of the playback video changes.
onMediaPlayerRecvSEIThe callback triggered when the media player got media side info.
onMediaPlayerSoundLevelUpdateThe callback of sound level update.
onMediaPlayerFrequencySpectrumUpdateThe callback of frequency spectrum update.
onMediaPlayerFirstFrameEventThe callback triggered when the media player plays the first frame.
onMediaPlayerLocalCacheThe callback triggered when the media player caches http/https network resource locally.

AudioEffectPlayer Functions

MethodDescription
createAudioEffectPlayerCreates a audio effect player instance.
destroyAudioEffectPlayerDestroys a audio effect player instance.
startStart playing audio effect.
stopStop playing audio effect.
pausePause playing audio effect.
resumeResume playing audio effect.
stopAllStop playing all audio effect.
pauseAllPause playing all audio effect.
resumeAllResume playing all audio effect.
seekToSet the specified playback progress.
setVolumeSet volume for a single audio effect. Both the local play volume and the publish volume are set.
setPlayVolumeSet local play volume for a single audio effect.
setPublishVolumeSet publish volume for a single audio effect.
setVolumeAllSet volume for all audio effect. Both the local play volume and the publish volume are set.
setPlayVolumeAllSet local play volume for all audio effect.
setPublishVolumeAllSet publish volume for all audio effect.
setPlaySpeedSet the playback speed for a given audio effect. Both the local play speed and the publish speed are set. (separate settings are not supported).
getTotalDurationGet the total duration of the specified audio effect resource.
getCurrentProgressGet current playback progress.
loadResourceLoad audio effect resource.
unloadResourceUnload audio effect resource.
updatePositionUpdate the position of the audio effect player (audio source).
getIndexGet audio effect player index.
onAudioEffectPlayStateUpdateAudio effect playback state callback.

Recording Functions

MethodDescription
startRecordingCapturedDataStarts to record and directly save the data to a file.
stopRecordingCapturedDataStops recording locally captured audio or video.
startRecordingRemoteDataStarts to record and directly save the data to a file.
stopRecordingRemoteDataStops recording locally captured audio or video.
onCapturedDataRecordStateUpdateThe callback triggered when the state of data recording (to a file) changes.
onCapturedDataRecordProgressUpdateThe callback to report the current recording progress.
onRemoteDataRecordStateUpdateThe callback triggered when the state of data recording (to a file) changes.
onRemoteDataRecordProgressUpdateThe callback to report the current recording progress.

Device Management Functions

MethodDescription
muteMicrophoneMutes or unmutes the microphone.
isMicrophoneMutedChecks whether the microphone is muted.
muteSpeakerMutes or unmutes the audio output speaker.
isSpeakerMutedChecks whether the audio output speaker is muted.
getAudioDeviceListGets a list of audio devices.
getDefaultAudioDeviceIDGet the device ID of the default audio device.
useAudioDeviceChooses to use the specified audio device.
getAudioDeviceVolumeGet volume for the specified audio device.
setAudioDeviceVolumeSet volume for the specified audio device.
setSpeakerVolumeInAPPSet the volume of the speaker in the App.
getSpeakerVolumeInAPPGet the volume of the speaker in the App, only support Windows.
startAudioDeviceVolumeMonitorTurn on audio device volume monitoring.
stopAudioDeviceVolumeMonitorTurn off audio device volume monitoring. Only for Windows/macOS.
muteAudioDeviceMutes or unmutes the audio device.
setAudioDeviceModeSet the audio device mode.
isAudioDeviceMutedCheck if the audio device is muted.
enableAudioCaptureDeviceEnables or disables the audio capture device.
getAudioRouteTypeget current audio route type.
setAudioRouteToSpeakerWhether to use the built-in speaker to play audio.
enableCameraTurns on/off the camera (for the specified channel).
useFrontCameraSwitches to the front or the rear camera (for the specified channel).
isCameraFocusSupportedWhether the camera supports focusing.
setCameraFocusModeSet the camera focus mode.
setCameraFocusPointInPreviewSet the focus point in the preview view.
setCameraExposureModeSet the camera exposure mode.
setCameraExposurePointInPreviewSet the exposure point in the preview view.
setCameraExposureCompensationSet the camera exposure compensation value and support spedifying the publish channel.
setCameraZoomFactorSet 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).
getCameraMaxZoomFactorGet the maximum zoom factor of the camera and support specifying the publish channel.
enableCameraAdaptiveFPSEnable camera adaptive frame rate.
useVideoDeviceChooses to use the specified video device (for the specified channel).
getVideoDeviceListGets a list of video devices.
useAudioOutputDeviceSwitch the audio output device.
getDefaultVideoDeviceIDGet the device ID of the default video device.
startSoundLevelMonitorStarts sound level monitoring. Support enable some advanced feature.
stopSoundLevelMonitorStops sound level monitoring.
startAudioSpectrumMonitorStarts audio spectrum monitoring. Support setting the listening interval.
stopAudioSpectrumMonitorStops audio spectrum monitoring.
enableHeadphoneMonitorEnables or disables headphone monitoring.
setHeadphoneMonitorVolumeSets the headphone monitor volume.
enableMixSystemPlayoutEnable or disable system audio capture.
setMixSystemPlayoutVolumeset system audio capture volume.
enableMixEnginePlayoutEnable or disable mix SDK playout to stream publishing.
startAudioVADStableStateMonitorStart audio VAD stable state monitoring, and the monitoring period can be set.
stopAudioVADStableStateMonitorStop audio VAD stable state monitoring.
onAudioDeviceStateChangedThe callback triggered when there is a change to audio devices (i.e. new device added or existing device deleted).
onAudioDeviceVolumeChangedThe callback triggered when there is a change of the volume for the audio devices.
onVideoDeviceStateChangedThe callback triggered when there is a change to video devices (i.e. new device added or existing device deleted).
onCapturedSoundLevelUpdateThe local captured audio sound level callback.
onCapturedSoundLevelInfoUpdateThe local captured audio sound level callback, supported vad.
onRemoteSoundLevelUpdateThe remote playing streams audio sound level callback.
onRemoteSoundLevelInfoUpdateThe remote playing streams audio sound level callback, supported vad.
onCapturedAudioSpectrumUpdateThe local captured audio spectrum callback.
onRemoteAudioSpectrumUpdateThe remote playing streams audio spectrum callback.
onLocalDeviceExceptionOccurredThe callback triggered when a local device exception occurred.
onRemoteCameraStateUpdateThe callback triggered when the state of the remote camera changes.
onRemoteMicStateUpdateThe callback triggered when the state of the remote microphone changes.
onRemoteSpeakerStateUpdateThe callback triggered when the state of the remote speaker changes.
onAudioRouteChangeCallback for device's audio route changed.
onAudioVADStateUpdateCallback for audio VAD stable state update.
getCurrentAudioDeviceGet the audio device information currently in use.

Custom Video Capture or Rendering Functions

MethodDescription
enableCustomVideoRenderEnables or disables custom video rendering.
enableCustomVideoCaptureEnables or disables custom video capture (for the specified channel).
enableCustomVideoProcessingEnables or disables custom video processing, and support specifying the publish channel.

Custom Audio Capture or Rendering Functions

MethodDescription
enableCustomAudioCaptureProcessingEnable local collection and custom audio processing(before ear return).
enableCustomAudioCaptureProcessingAfterHeadphoneMonitorTurn on local collection and custom audio processing (after ear return).
enableAlignedAudioAuxDataEnable feature of throwing audio aux frames which aligned with accompany.
enableCustomAudioRemoteProcessingEnable custom audio processing for remote playing stream.
enableCustomAudioPlaybackProcessingEnable custom audio processing for SDK playback audio data.
startAudioDataObserverEnable audio data observering.
stopAudioDataObserverDisable audio data observering.
enableCustomAudioIOEnables the custom audio I/O function (for the specified channel), support PCM, AAC format data.
sendCustomAudioCaptureAACDataSends AAC audio data produced by custom audio capture to the SDK (for the specified channel).
sendCustomAudioCapturePCMDataSends PCM audio data produced by custom audio capture to the SDK (for the specified channel).
fetchCustomAudioRenderPCMDataFetches PCM audio data of the remote stream from the SDK for custom audio rendering.
onProcessCapturedAudioDataCustom audio processing local captured PCM audio frame callback.
onProcessCapturedAudioDataAfterUsedHeadphoneMonitorCustom audio processing local captured PCM audio frame callback after used headphone monitor.
onAlignedAudioAuxDataAligned audio aux frames callback.
onProcessRemoteAudioDataCustom audio processing remote playing stream PCM audio frame callback.
onProcessPlaybackAudioDataCustom audio processing SDK playback PCM audio frame callback.
onCapturedAudioDataThe callback for obtaining the audio data captured by the local microphone.
onPlaybackAudioDataThe callback for obtaining the audio data of all the streams playback by SDK.
onMixedAudioDataCallback 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.
onPlayerAudioDataThe callback for obtaining the audio data of each stream.

Media Publisher Functions

MethodDescription
createMediaDataPublisherCreates a media data publisher instance.
destroyMediaDataPublisherDestroys a media data publisher instance.
addMediaFilePathAdd media file to the publish queue. Currently, only mp4 / m4a / aac files are supported, and special conversion is required.
resetClear all the status in this media data publisher, so that it can be restarted next time.
setVideoSendDelayTimeSet the delay time of video playback.
seekToSpecify the starting point of the current video file publishing.
getTotalDurationGet the total duration of the current file.
getCurrentDurationGet the playing progress of the current file.
getIndexGet the channel index of the media data publisher.
onMediaDataPublisherFileOpenThe event callback of the media data publisher opening a media file.
onMediaDataPublisherFileCloseThe event callback of the media data publisher closing a media file.
onMediaDataPublisherFileDataBeginThe event callback that the media data publisher has read data from the media file.
onMediaDataPublisherFileDataEndThe event callback that the media data publisher has completed a file stream publishing.

Utilities Functions

MethodDescription
startPerformanceMonitorStart system performance monitoring.
stopPerformanceMonitorStop system performance monitoring.
startNetworkProbeStart network probe.
stopNetworkProbeStop network probe.
startNetworkSpeedTestStart network speed test. Support set speed test interval。
stopNetworkSpeedTestStop network speed test.
getNetworkTimeInfoObtain synchronization network time information.
startDumpDataDump audio, video data.
stopDumpDataStop dumping data.
uploadDumpDataUpload dumped data to the ZEGO server.
removeDumpDataRemove dumped data.
onPerformanceStatusUpdateSystem performance monitoring callback.
onNetworkModeChangedNetwork mode changed callback.
onNetworkSpeedTestErrorNetwork speed test error callback.
onNetworkSpeedTestQualityUpdateNetwork speed test quality callback.
onNetworkQualityThe network quality callback of users who are publishing in the room.
onRtcStatsRTC network statistics callback.
onNetworkTimeSynchronizedSuccessful callback of network time synchronization.
onRequestDumpDataRequest to dump data.
onRequestUploadDumpDataRequest to dump data.
onStartDumpDataCallback when starting to dump data.
onStopDumpDataCallback when stopping to dump data.
onUploadDumpDataCallback after uploading the dump data.

RangeAudio Functions

MethodDescription
createRangeAudioCreates a range audio instance.
destroyRangeAudioDestroys a range audio instance.
setAudioReceiveRangeSet the configuration of the audio receiving range.
setPositionUpdateFrequencySet the frequency of real-time update locations within the SDK.
setRangeAudioVolumeSet range voice volume.
setStreamVocalRangeSet the sound range for the stream.
updateStreamPositionUpdate the location of the flow.
updateSelfPositionUpdate self position and orentation.
updateAudioSourceAdd or update audio source position information.
enableSpatializerTurn the 3D spatial sound on or off.
enableMicrophoneTurn the microphone on or off.
enableSpeakerTurn the speaker on or off.
setRangeAudioModeSet range audio mode.
setRangeAudioCustomModeSet range audio custom mode.
setTeamIDSet team ID.
muteUserWhether can receive the audio data of the specified user.
onRangeAudioMicrophoneStateUpdateRange audio microphone state callback.

CopyrightedMusic Functions

MethodDescription
createCopyrightedMusicCreates a copyrighted music instance.
destroyCopyrightedMusicDestroys a copyrighted music instance.
initCopyrightedMusicInitialize the copyrighted music module.
getCacheSizeGet cache size.
clearCacheClear cache.
sendExtendedRequestSend extended feature request.
getLrcLyricGet lyrics in lrc format.
getLrcLyricWithConfigGet lyrics in lrc format.
getKrcLyricByTokenGet lyrics in krc format.
requestResourceRequest music resource.
requestResourceV2Request music resource.
getSharedResourceGet shared music resource.
getSharedResourceV2Get shared music resource.
downloadDownload music resource.
cancelDownloadCancel download of music resource.
queryCacheWithConfigQuery the resource's cache is existed or not.
queryCacheWithConfigV2Query the resource's cache is existed or not.
getDurationGet the playing time of a song or accompaniment file.
setScoringLevelSet the difficulty level of scoring.
startScoreStart scoring.
pauseScorePause scoring.
resumeScoreResume scoring.
stopScoreStop scoring.
resetScoreReset scoring.
getPreviousScoreGet the score of the previous sentence.
getAverageScoreGet average score.
getTotalScoreGet total score .
getFullScoreGet full score .
getStandardPitchGet standard pitch data.
getCurrentPitchGet real-time pitch data.
onDownloadProgressUpdateCallback for download song or accompaniment progress rate.
onCurrentPitchValueUpdateReal-time pitch line callback.

PictureCapturer Functions

MethodDescription
createPictureCapturerCreate picture capturer instance.
destroyPictureCapturerDestroys a picture capturer instance.
setPathSet the path of the picture capturer source.
getIndexGet picture capturer instance index.

Deprecated APIs

MethodDescription
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.
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.
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.
setVoiceChangerParam[Deprecated] Setting up the specific voice changer parameters.
enableAudioCapture[Deprecated] Whether to collect the sound of the window process during window collection

Previous

FAQ