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
uploadLogUpload local logs
setRoomScenarioset room scenario
destroyEnginedestroy Engine.
setGeoFenceSet Geo Fence.
setEngineOptionsSet engine advanced configuration.
useImport module, you can import other modules on demand through this interface.
setTurnServerTurn server configuration for proxy.
callExperimentalAPIThe error log information alert indicates that the default test environment is all on
checkSystemRequirementsSupport capability detection interface
offDelete the registered callback event
onRegister callback event
enableMultiRoomturn on multi room mode
presetLogConfigDefault log configuration
setLogConfigAdvanced log configuration
setCloudProxyConfigSet up cloud proxy configuration.
setLocalProxyConfigSet local proxy configuration.
setDebugVerboseThe error log information alert indicates that the default test environment is all on
getVersionGet the current SDK version

Room functions

MethodDescription
loginRoomLogin room
switchRoomswitch room
logoutRoomExit the room and no longer accept various state in the room
renewTokenUpdate room permission token
setRoomExtraInfoSet room extra information

Stream Publishing Functions

MethodDescription
createStreamCompositorCreate a broadcast station
setSEIConfigSet SEI related configuration information
setEngineConfigSet engine advanced configuration.
createStreamCreate push streaming data sources, including camera microphone collection source data, screen sharing data, third-party source data (other source data that can be played on the page)
createZegoStreamCreate an instance of the push object ZegoLocalStream. The integrated functions of ZegoLocalStream include camera microphone capture, screen sharing capture, third-party source data (other source data that can be played on the page), and playback preview of the collected stream.
updatePublishingStreamUsed to update audio and video tracks of ZegoLocalStream instances that are being pushed
getPublishingStreamQualityGet the publishing stream quality.
getElectronScreenSourcesCalled when screen sharing is required in the electron framework to return screen list data
destroyStreamDestroy the created stream data
checkVideoTrackIsActiveCheck whether the video track is active.
checkAudioTrackIsActiveCheck whether the audio track is active.
startPublishingStreamStart publishing stream
stopPublishingStreamStop pushing the local stream to the remote end (Zego server)
sendSEISends Supplemental Enhancement Information.
setVideoConfigModify push streaming parameters
setAudioConfigModify the relevant parameters of push streaming audio
replaceTrackReplace the audio and video tracks of the media stream
addTrackAdd an audio or video track to a media stream.
removeTrackRemove video track from media stream.
setCaptureVolumeAfter the stream is created, the volume can be adjusted through this interface
setDummyCaptureImagePathSet the path of the still picture to be pushed off
setStreamExtraInfoSet additional information for the stream
addPublishCdnUrlNotify the instant server to forward the stream to the CDN
removePublishCdnUrlNotify the instant server to stop forwarding the stream to the CDN
mutePublishStreamVideoClose/open the streaming screen being pushed
mutePublishStreamAudioTurn on/off the streaming sound that is being pushed, including the sound of the microphone and mixed background music
setEffectsBeautyTurn beauty effect on or off
setLowlightEnhancementSet low light enhancement.
enableDualStreamenable dual stream
setLowStreamParameterset low stream parameter
enableHardwareEncoderOn/off hardware encoding.
enableAutoSwitchDeviceTurn on or off automatic switching of related devices
initBackgroundModuleInitialize the background processing module.
setBackgroundBlurOptionsSet parameters for background blur of the stream.
setVirtualBackgroundOptionsSet virtual background related processing parameters.
setTransparentBackgroundOptionsSet transparent background related processing parameters.
enableBackgroundProcessTurn on background processing.
setVoiceChangerParamSound modification processing.
setVoiceChangerPresetSound modification processing.
setReverbPresetSet reverb via preset enum.
enableVirtualStereoEnable or disable the virtual stereo effect when streaming.
enableAiDenoiseIncoming media stream, turn AI noise reduction on or off
setAiDenoiseModeIncoming media stream, turn AI noise reduction on or off
setStreamAlignmentPropertyTurn on or off the mixed flow precise alignment function.
playAudioPlay a audio of the media stream to be pushed or that has been pushed on the page.
playCaptureAudioPlays the latest media stream audio that is being captured.
playCaptureVideoPlays a video of the latest media stream being captured on the page.
playVideoPlay a video of the media stream to be pushed or that has been pushed on the page.
stopAudioStop playing the audio in the stream to be pushed or being pushed.
stopCaptureAudioStop capturing audio.
stopCaptureVideoStop capturing video.
stopPlayCaptureAudioStop playing the audio of the latest captured media stream.
stopPlayCaptureVideoStop the page from playing all the latest streaming videos that are being captured.
stopVideoStop playing the video in the stream to be pushed or being pushed.
resumeAudioRestore the audio that is being pushed or is being pushed on the playback page.
resumeVideoRestore the video that is being pushed or is being pushed on the playback page.
startCaptureCameraStart capturing camera video stream.
startCaptureCameraAndMicrophoneStart capturing camera and microphone stream.
startCaptureCustomAudioStart capturing custom audio stream.
startCaptureCustomVideoStart capturing custom video stream.
startCaptureCustomVideoAndAudioStart capturing custom video and audio stream.
startCaptureMicrophoneStart capturing microphone audio stream.
startCaptureScreenStart capturing the screen sharing video stream.
startCaptureScreenWithAudioStart capturing the screen sharing video and sharing audio stream.
getScreenDisplaySurfaceGet the shared content type of the screen sharing stream.
setVolumeSet the volume at which to play the audio that is being pushed or is being streamed.
useAudioOutputDeviceSwitch the audio output device.
onRegister callback event.
offUnregister callback events.
takeStreamSnapshotClient screenshot

Stream Playing Functions

MethodDescription
setCaptureAudioFrameCallbackSet the callback for streaming raw audio data
startPlayingStreamStart playing stream
stopPlayingStreamStop pulling remote streams (Zego server)
mutePlayStreamVideoStop or resume pulling video stream
setAudioFrameCallbackSet the callback for streaming raw audio data.
setPlayStreamVideoTypeSet the play video stream type
muteAllPlayAudioStreamsWhether the pull stream receives all audio data (including newly pulled streams in the room later)
muteAllPlayVideoStreamsWhether the pull stream receives all audio data (including newly pulled streams in the room later)
mutePlayStreamAudioStop or resume pulling audio streams
getPlayingStreamQualityGet the playing stream quality.

Instant Messaging Functions

MethodDescription
sendBarrageMessageSend room barrage message, the message is not guaranteed to be reliable
sendBroadcastMessageSend broadcast message (messages are guaranteed to be reliable)
sendCustomCommandsend custom command, the message is reliable
sendTransparentMessageSends a transparent message in room.

Stream Mixing Functions

MethodDescription
startAutoMixerTaskStart auto mixer task
startMixerTaskStart mixer task
stopAutoMixerTaskStop server-side mixer task
stopMixerTaskStop server-side mixer task
setMixerTaskConfigMixed flow advanced configuration

Audio Mixing Functions

MethodDescription
startMixingAudioStart Mixing Audio
stopMixingAudioStop mixing audio
setMixingAudioVolumeSet the mixing volume
enableLiveAudioEffectEnables or disables the sound enhancement.
setAudioChangerParamThe incoming audio is altered.

Device Management Functions

MethodDescription
enableVideoCaptureDeviceTurn on/off the video capture device.
enumDevicesObtain the device hardware information and provide the device id parameter for operating the hardware device interface.
getCamerasGet the list of camera devices and provide the device id parameter for operating the hardware device interface.
getMicrophonesGet the list of microphone devices and provide the device id parameter for operating the hardware device interface.
getSpeakersGet the list of speaker devices and provide the device id parameter for operating the hardware device interface.
useFrontCameraSwitch camera
useVideoDeviceSwitch camera
useAudioDeviceSwitch microphone
useAudioOutputDeviceSwitch the audio output device.
setSoundLevelDelegateSet whether to monitor the sound wave and the sound wave callback interval
isMicrophoneMutedGet microphone mute status
muteMicrophonemute microphone

Stream View

MethodDescription
playPlay the audio and video of the media stream on the page.
playVideoPlay videos of media streaming on the page.
playAudioPlay audio from media streams.
stopStop showing audio and video on the page.
stopVideoStop playing media streaming video.
stopAudioStop playing audio from media streams.
resumeResume playing audio and video on the page.
setAudioMutedSwitch audio playback.
setVideoMutedSwitch video playback.
useAudioOutputDeviceSwitch the audio output device.
setVolumeSet the audio playback volume.
onRegister callback event.
offUnregister callback events.
takeStreamSnapshotClient screenshot
createLocalStreamViewCreate a local media stream player component instance object.
createRemoteStreamViewCreate a remote media stream player component instance object.

Audio Effect Player

MethodDescription
startStart playing sound effects.
stopStop playing sound effects.
pauseStart playing sound effects.
resumeResume playing sound.
setVolumeSetting the playback volume of a single sound effect will set both the local playback volume and the streaming volume.
getTotalDurationGet the total duration of the specified sound effect resource.
getCurrentProgressGet the current playback progress.
seekToSet the playback progress.
createAudioEffectPlayerCreate a audio effect player instance.
loadAudioEffectLoad sound resources.
unloadAudioEffectUnload the sound resource.

Range Audio Functions

MethodDescription
createRangeAudioInstanceCreate a range voice instance object.
setVoiceChangerParam
setVoiceChangerPreset
enableAudioSourceUpdateCheckerWhether to check for changes to users in range.
onRegister callback event.
offUnregister callback events.
setAudioReceiveRangeSet the maximum range of audio reception distances.
updateSelfPositionUpdate the position and orientation of the listener.
updateAudioSourceAdd or update sound source position information.
enableSpatializerSwitch Spatializer.
enableMicrophoneSwitch microphone.
selectMicrophoneSpecifies the microphone device.
selectSpeakerSpecifies the speaker device.
enableSpeakerSwitch speaker.
setRangeAudioCustomModeHigh-level customization mode for setting range voices.
setRangeAudioModeSet the range audio mode.
setTeamIDSet the team ID.
setPositionUpdateFrequencySet how often the location is updated in real-time inside the SDK.
setRangeAudioVolumeSet the local playback volume of the range audio.
enableAiDenoiseScope Voice turns AI noise reduction on or off.
isAudioContextRunningDetermine whether the AudioContext object is enabled.
resumeAudioContextEnable the internal AudioContext object.
setStreamVocalRangeSet the streaming audio sending range.
updateStreamPositionUpdate the position of the pull stream.
setCustomSourceVocalRangeSet custom sound source send range.
updateCustomSourcePositionAdd or update custom sound source location information.

Copyrighted Music

MethodDescription
initCopyrightedMusicInitialize the copyright music module.
onRegister callback event.
sendExtendedRequestSend an extension feature request.
requestResourceSend an extension feature request.
getSharedResourceGet shared song resources.
getLrcLyricGet the lyrics in lrc format.
getKrcLyricByTokenGet lyrics in krc format.
downloadDownload a song or accompaniment.
clearCacheClear song cache.
startScoreStart Scoring.
stopScoreStop Scoring.
pauseScorepause scoring.
resumeScoreresume scoring.
resetScorereset the score.
getPreviousScoreGet the score of the previous sentence.
getAverageScoreGet the average rating.
getTotalScoreGet the total score.
getFullScoreGet full marks.
getStandardPitchGet standard pitch data.
getCurrentPitchGet real-time pitch data.
setScoringLevelSet the scoring difficulty level.
createCopyrightedMusicCreate a copyrighted music instance object.
destroyCopyrightedMusicDestroy a copyrighted music instance object.

Real-Time Sequential Data

MethodDescription
createRealTimeSequentialDataManagerCreate real-time sequential data instance objects
destroyRealTimeSequentialDataManagerdestroy real-time sequential data instance objects
startBroadcastingstart Broadcasting
stopBroadcastingstop Broadcasting
sendRealTimeSequentialDatasend RealTime Sequential Data
startSubscribingstart Subscribing
stopSubscribingstopSubscribing
onRegister callback event.
offUnregister callback events.

Player plug-in (Separate integration)

MethodDescription
verifyPlayer authentication
playThe player starts playing
pauseThe player starts playing
resumeThe player re-pulls the current CDN live stream.
stopStop playing the resource and no longer load the currently specified media
fullScreenPlayer plays in full screen
destroyDestroy player
setVolumePlayer volume settings
getPlayQualityPlayer get quality
setMutedPlayer settings playback mute switch
setBufferInterval
enableSoundLevelMonitorSet whether to monitor the sound wave and the sound wave callback interval
ZegoExpressPlayerPlayer plug-in constructor
onCanPlayPlayer CDN resource playable callback
onPlayPlayer rendering (play resource) starts callback
onPausedPlayer rendering pause callback
onLoadedCDN resource loading end callback
onTimeUpdateCallback for current playback time change
onWaitingPlayback has stopped due to temporary lack of data.
onPlayingPlayback loads enough data that playback can be resumed.
onErrorPlayer error callback
onMediaInfoUpdatePlayback CDN resource media information update callback
onResetPlayQualityA callback when the player resets the streaming quality statistics
onRecvSEIA callback when the player receives SEI data
onSoundLevelUpdateSound wave callback for playing audio

Previous

FAQ

Next

Class