提交工单
咨询集成、功能及报价等问题
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. |
| 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, with callback. |
| 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 |
| 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 with callback. |
| 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). |
| setAppOrientation | Sets the video orientation (for the specified channel). |
| setAudioConfig | Sets up the audio configurations for the specified publish channel. |
| getAudioConfig | Gets the current audio configurations from the specified publish channel. |
| setPublishStreamEncryptionKey | Set encryption key for 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. |
| enableTrafficControl | Enables or disables the traffic control for the specified publish channel. |
| 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. |
| setCaptureVolume | Sets the audio recording volume for stream publishing. |
| 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. |
| isVideoEncoderSupported | Whether the specified video encoding type is supported. |
| setAppOrientationMode | Set the orientation mode of the video. |
| setVideoSource | Set a video capture instance as video capture source for the specified channel. |
| setAudioSource | Set audio capture source for the specified channel. |
| 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. |
| 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. |
| 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. |
| 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. (When set to true, calling [mutePlayStreamAudio] will not take effect) |
| muteAllPlayStreamVideo | Can the pull stream receive all video data. (When set to true, calling [mutePlayStreamVideo] will not take effect) |
| 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. |
| 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. |
| 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. |
| Method | Description |
|---|---|
| sendCustomCommand | Sends a Custom Command to the specified users in the same room. |
| onIMRecvCustomCommand | The callback triggered when a Custom Command is received. |
| 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. |
| 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. |
| Method | Description |
|---|---|
| createMediaPlayer | Creates a media player instance. |
| destroyMediaPlayer | Destroys a media player instance. |
| loadResourceWithConfig | Load local or network media resource with config. |
| start | Start playing. |
| stop | Stop playing. |
| 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. |
| 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. |
| setAudioDeviceMode | Set the audio device mode. |
| isAudioDeviceMuted | Check if the audio device is muted. |
| 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 (for the specified channel). |
| 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 and support spedifying the publish channel. |
| 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 and support specifying the publish channel. |
| enableCameraAdaptiveFPS | Enable camera adaptive frame rate. |
| 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 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). |
| onCapturedSoundLevelInfoUpdate | The local captured audio sound level callback, supported vad. |
| 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. |
| getCurrentAudioDevice | Get the audio device information currently in use. |
| Method | Description |
|---|---|
| startPerformanceMonitor | Start system performance monitoring. |
| stopPerformanceMonitor | Stop system performance monitoring. |
| startNetworkSpeedTest | Start network speed test. Support set speed test interval。 |
| stopNetworkSpeedTest | Stop network speed test. |
| onPerformanceStatusUpdate | System performance monitoring 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 |
|---|---|
| setAppGroupID | Set the App Group configuration item. |
| startScreenCaptureInApp | Start screen capture, in-app capture only. |
| 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. |
| onScreenCaptureStart | The callback triggered when start screen capture. |
