提交工单
咨询集成、功能及报价等问题
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.
Method | Description |
---|---|
createEngine | Create ZegoExpressEngine singleton object and initialize SDK. |
destroyEngine | Destroy the ZegoExpressEngine singleton object and deinitialize the SDK. |
setEngineConfig | Set advanced engine configuration. |
setLogConfig | Set log configuration. |
setRoomMode | Set room mode. |
setGeoFence | Set Geo Fence. |
getVersion | Gets the SDK's version number. |
isFeatureSupported | Query whether the current SDK supports the specified feature. |
setRoomScenario | Set room scenario. |
uploadLog | 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. |
onEngineStateUpdate | The callback triggered when the audio/video engine state changes. |
onRecvExperimentalAPI | Experimental API callback |
Method | Description |
---|---|
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 of the specified room ID. |
switchRoom | Switch the room with advanced room configurations. |
renewToken | Renew token. |
setRoomExtraInfo | Set room extra information. |
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. |
Method | Description |
---|---|
startPublishingStream | Starts publishing a stream. Support multi-room mode. |
stopPublishingStream | Stops publishing a stream (for the specified channel). |
setStreamExtraInfo | Sets the extra information of the stream being published for the specified publish channel. |
startPreview | Starts/Updates the local video preview (for the specified channel). |
stopPreview | Stops the local preview (for the specified channel). |
setVideoConfig | Sets up the video configurations (for the specified channel). |
getVideoConfig | Gets the current video configurations (for the specified channel). |
setVideoMirrorMode | Sets the video mirroring mode (for the specified channel). |
setAudioConfig | Sets up the audio configurations. |
setAudioConfigWithChannel | Sets up the audio configurations for the specified publish channel. |
getAudioConfig | Gets the current audio configurations. |
setPublishStreamEncryptionKey | Set encryption key for the publishing stream for the specified publish channel. |
takePublishStreamSnapshot | Take a snapshot of the publishing stream for the specified publish channel. |
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 for the specified channel. |
setStreamAlignmentProperty | Enable or disable the stream precision alignment function. |
enableTrafficControl | Enables or disables the traffic control for the specified publish channel. |
setMinVideoBitrateForTrafficControl | Set the minimum video bitrate threshold for traffic control. |
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 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. |
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), for the specified channel. |
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 to the specified publish channel. |
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 and implementation are supported. |
setLowlightEnhancement | Set low light enhancement. |
setVideoSource | Set a video capture instance as video capture source for the specified channel. |
setAudioSource | Set audio capture source for the specified channel. |
setAudioSourceWithConfig | Set audio capture source with audio mix config. |
enableVideoObjectSegmentation | Enable video object segmentation. |
enableAlphaChannelVideoEncoder | Enable video encoder alpha channel support. |
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. |
onPublisherVideoSizeChanged | The callback triggered when the video capture resolution changes. |
onPublisherRelayCDNStateUpdate | The callback triggered when the state of relayed streaming to CDN changes. |
onVideoObjectSegmentationStateChanged | The video object segmentation state changed. |
Method | Description |
---|---|
startPlayingStream | Starts playing a stream from ZEGO RTC server or from third-party CDN. Support multi-room mode. |
stopPlayingStream | Stops playing a stream. |
setPlayStreamDecryptionKey | Set decryption key for the playing stream. |
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. |
muteAllPlayStreamVideo | 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. |
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. |
onPlayerRenderVideoFirstFrame | The callback triggered when the first video frame is rendered. |
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. |
Method | Description |
---|---|
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. |
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. |
Method | Description |
---|---|
startMixerTask | Starts a stream mixing task. |
stopMixerTask | Stops a stream mixing task. |
Method | Description |
---|---|
enableAEC | Whether to enable acoustic echo cancellation (AEC). |
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. |
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. |
Method | Description |
---|---|
createMediaPlayer | Creates a media player instance. |
destroyMediaPlayer | Destroys a media player instance. |
loadResource | Load local or network media resource. |
loadResourceWithPosition | Load local or network media resource and specify the start position. |
loadCopyrightedMusicResourceWithPosition | Load copyrighted music resource. |
start | Start playing. |
stop | Stop playing. |
pause | Pause playing. |
resume | Resume playing. |
seekTo | Set the specified playback progress. |
enableRepeat | Whether to repeat playback. |
enableAux | Whether to mix the player's sound into the stream being published. |
muteLocal | Whether to play locally silently. |
setPlayerView | 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. |
getCurrentState | Get the current playback status. |
getIndex | Get media player index. |
takeSnapshot | Take a screenshot of the current playing screen of the media player. |
enableSoundLevelMonitor | Whether to enable sound level monitoring. |
enableFrequencySpectrumMonitor | Whether to enable frequency spectrum monitoring. |
getMediaInfo | Get meida information such as video resolution from media file. |
enablePublishVideo | Whether to mix the player's video into the stream being published. |
getCustomVideoCapturePlugin | Get the custom video capture plugin of the media player |
registerCustomAudioProcessPlugin | Register custom audio data processing plugin for mediaplayer. |
unregisterCustomAudioProcessPlugin | Unregister custom audio processing plugin for mediaplayer. |
enableLiveAudioEffect | Enable live audio effect. |
enableLocalCache | Enable local caching of http/https network resources. |
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. |
onMediaPlayerLoadResource | Callback to the result of media player loading resources. |
onMediaPlayerVideoData | Callback to mediaplayer video data. |
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. |
Method | Description |
---|---|
createAudioEffectPlayer | Creates a audio effect player instance. |
destroyAudioEffectPlayer | Destroys a audio effect player instance. |
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. |
setVolumeAll | Set volume for all audio effect. Both the local play volume and the publish volume are set. |
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. |
getIndex | Get audio effect player index. |
onAudioEffectPlayStateUpdate | Audio effect playback state callback. |
Method | Description |
---|---|
startRecordingCapturedData | Starts to record and directly save the data to a file. |
stopRecordingCapturedData | Stops recording locally captured audio or video. |
onCapturedDataRecordStateUpdate | The callback triggered when the state of data recording (to a file) changes. |
onCapturedDataRecordProgressUpdate | The callback to report the current recording progress. |
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. |
getAudioDeviceList | Gets a list of audio devices. |
getDefaultAudioDeviceID | Get the device ID of the default audio device. |
useAudioDevice | Chooses to use the specified audio device. |
getAudioDeviceVolume | Get volume for the specified audio device. |
setAudioDeviceVolume | Set volume for the specified audio device. |
setSpeakerVolumeInAPP | Set the volume of the speaker in the App. |
getSpeakerVolumeInAPP | Get the volume of the speaker in the App, only support Windows. |
startAudioDeviceVolumeMonitor | Turn on audio device volume monitoring. |
stopAudioDeviceVolumeMonitor | Turn off audio device volume monitoring. Only for Windows/macOS. |
muteAudioDevice | Mutes or unmutes the audio device. |
enableAudioCaptureDevice | Enables or disables the audio capture device. |
enableCamera | Turns on/off the camera (for the specified channel). |
useVideoDevice | Chooses to use the specified video device (for the specified channel). |
getVideoDeviceList | Gets a list of video devices. |
getDefaultVideoDeviceID | Get the device ID of the default video device. |
startSoundLevelMonitor | Starts sound level monitoring. Support setting the listening interval. |
startSoundLevelMonitorWithConfig | Starts sound level monitoring. Support enable some advanced feature. |
stopSoundLevelMonitor | Stops sound level 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. |
enableMixSystemPlayout | Enable or disable system audio capture. |
setMixSystemPlayoutVolume | set system audio capture volume. |
enableMixEnginePlayout | Enable or disable mix SDK playout to stream publishing. |
startAudioVADStableStateMonitor | Start audio VAD stable state monitoring, and the monitoring period can be set. |
stopAudioVADStableStateMonitor | Stop audio VAD stable state monitoring. |
onAudioDeviceStateChanged | The callback triggered when there is a change to audio devices (i.e. new device added or existing device deleted). |
onAudioDeviceVolumeChanged | The callback triggered when there is a change of the volume for the audio devices. |
onVideoDeviceStateChanged | The callback triggered when there is a change to video devices (i.e. new device added or existing device deleted). |
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. |
onLocalCaptureVideoData | Callback to local capture video data. |
onRemotePlayVideoData | Callback to play stream video data. |
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. |
onAudioVADStateUpdate | Callback for audio VAD stable state update. |
getCurrentAudioDevice | Get the audio device information currently in use. |
Method | Description |
---|---|
enableCustomVideoCapture | Enables or disables custom video capture (for the specified channel). |
enableExternalRender | enable/disable external render, when external rendering is enabled, data rendering will no longer take place inside the SDK. |
registerCustomVideoCapturePlugin | register custom video capture plugin |
unregisterCustomVideoCapturePlugin | unregister custom video capture plugin |
enableCameraVideoDataCapturePlugin | Enable or disable the camera video data capture plugin |
getCameraVideoDataCapturePlugin | Get the camera video data capture plugin, it needs to call interface [enableCameraVideoDataCapturePlugin] open to use. |
setCustomVideoCaptureFillMode | Sets the video fill mode 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). |
enableCustomVideoProcessing | Enables or disables custom video processing, and support specifying the publish channel. |
registerCustomVideoProcessPlugin | Register custom video process plugin |
setCustomVideoProcessCutRegion | Set the custom video process crop region |
Method | Description |
---|---|
enableCustomAudioCaptureProcessing | Enable local collection and custom audio processing(before ear return). |
registerCustomAudioProcessPlugin | Register custom audio processing plugin. |
unregisterCustomAudioProcessPlugin | Unregister custom audio processing plugin. |
enableCustomAudioCaptureProcessingAfterHeadphoneMonitor | Turn on local collection and custom audio processing (after ear return). |
enableCustomAudioIO | Enables the custom audio I/O function (for the specified channel), support PCM, AAC format data. |
registerCustomAudioCapturePlugin | register custom audio capture plugin |
unregisterCustomAudioCapturePlugin | unregister custom audio capture plugin |
Method | Description |
---|---|
startNetworkSpeedTest | Start network speed test. Support set speed test interval。 |
stopNetworkSpeedTest | Stop network speed test. |
getNetworkTimeInfo | Obtain synchronization network time information. |
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. |
Method | Description |
---|---|
createCopyrightedMusic | Creates a copyrighted music instance. |
destroyCopyrightedMusic | Destroys a copyrighted music instance. |
initCopyrightedMusic | Initialize the copyrighted music module. |
getCacheSize | Get cache size. |
clearCache | Clear cache. |
sendExtendedRequest | Send extended feature request. |
getLrcLyricWithVendorID | Get lyrics in lrc format. |
getLrcLyricWithConfig | Get lyrics in lrc format. |
getKrcLyricByToken | Get lyrics in krc format. |
requestResource | Request music resource. |
requestResourceWithConfigV2 | Request music resource. |
getSharedResource | Get shared music resource. |
getSharedResourceWithConfigV2 | Get shared music resource. |
download | Download music resource. |
queryCacheWithConfig | Query the resource's cache is existed or not. |
queryCacheWithConfigV2 | 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. |
Method | Description |
---|---|
getScreenCaptureSources | Get a list of screens or windows in a screen. |
createScreenCaptureSource | Create the screen capture source |
destroyScreenCaptureSource | Destroy the screen capture source instance |
updateCaptureSource | Create the screen capture source |
startCapture | Start screen capture. |
stopCapture | Stop screen capture. |
getCaptureSourceRect | Gets the rectangle of the screen capture source. |
updateCaptureRegion | Update the area captured by the screen. |
updatePublishRegion | Update the streaming area of the screen capture. |
setExcludeWindowList | Sets the filtered list of windows. |
enableWindowActivate | Whether to activate the promotion of the window to the foreground. |
enableCursorVisible | Set whether to show the cursor |
getIndex | Get screen capture source index. |
onExceptionOccurred | The callback triggered when a screen capture source exception occurred |
onWindowStateChanged | The callback will be triggered when the state of the capture target window change. |
onRectChanged | The callback will be triggered when the state of the capture target window change. |
Method | Description |
---|---|
init | [Deprecated] Initializes the Engine. Deprecated since 2.14.0, please use the method [createEngine] instead. |
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 [getLrcLyricWithVendorID]. |
queryCache | [Deprecated] Query the resource's cache is existed or not. Deprecated since 3.2.1, please use the method [queryCacheWithVendorID]. |
queryCacheWithVendorID | [Deprecated] Query the resource's cache is existed or not. Deprecated since 3.9.0, please use the method [queryCacheWithConfig] with the name with [config] parameter instead. |
setVoiceChangerParam | [Deprecated] Setting up the specific voice changer parameters. |