ZegoExpressEngine class

Available Extensions

Properties

hashCode → int
The hash code for this object.
read-onlyinherited
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

callExperimentalAPI(String params) → Future<String>
Call the experimental API.
enableDebugAssistant(bool enable) → Future<void>
Enable the debug assistant. Note, do not enable this feature in the online version! Use only during development phase!
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setRoomScenario(ZegoScenario scenario) → Future<void>
Set room scenario.
toString() → String
A string representation of this object.
inherited
uploadLog() → Future<void>
Uploads logs to the ZEGO server.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance ZegoExpressEngine
Engine singleton instance
final
onAIVoiceChangerGetSpeakerList ↔ (void Function(ZegoAIVoiceChanger aiVoiceChanger, int errorCode, List<ZegoAIVoiceChangerSpeakerInfo> speakerList)?)
Get AI voice changer engine available speaker list callback.
read / write
onAIVoiceChangerInit ↔ (void Function(ZegoAIVoiceChanger aiVoiceChanger, int errorCode)?)
Initialize AI voice changer engine status callback.
read / write
onAIVoiceChangerUpdate ↔ (void Function(ZegoAIVoiceChanger aiVoiceChanger, int errorCode)?)
Update AI voice changer engine models status callback.
read / write
onAIVoiceChangerUpdateProgress ↔ (void Function(ZegoAIVoiceChanger aiVoiceChanger, double percent, int fileIndex, int fileCount)?)
Update AI voice changer engine models progress callback.
read / write
onAlignedAudioAuxData ↔ (void Function(Uint8List data, ZegoAudioFrameParam param)?)
Aligned audio aux frames callback.
read / write
onApiCalledResult ↔ (void Function(int errorCode, String funcName, String info)?)
Method execution result callback
read / write
onAudioDeviceStateChanged ↔ (void Function(ZegoUpdateType updateType, ZegoAudioDeviceType deviceType, ZegoDeviceInfo deviceInfo)?)
The callback triggered when there is a change to audio devices (i.e. new device added or existing device deleted).
read / write
onAudioDeviceVolumeChanged ↔ (void Function(ZegoAudioDeviceType deviceType, String deviceID, int volume)?)
The callback triggered when there is a change of the volume for the audio devices.
read / write
onAudioEffectPlayStateUpdate ↔ (void Function(ZegoAudioEffectPlayer audioEffectPlayer, int audioEffectID, ZegoAudioEffectPlayState state, int errorCode)?)
Audio effect playback state callback.
read / write
onAudioRouteChange ↔ (void Function(ZegoAudioRoute audioRoute)?)
Callback for device's audio route changed.
read / write
onAudioVADStateUpdate ↔ (void Function(ZegoAudioVADStableStateMonitorType type, ZegoAudioVADType state)?)
Callback for audio VAD stable state update.
read / write
onAutoMixerSoundLevelUpdate ↔ (void Function(Map<String, double> soundLevels)?)
The callback triggered when the sound level of any input stream changes in the auto stream mixing process.
read / write
onCapturedAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param)?)
The callback for obtaining the audio data captured by the local microphone.
read / write
onCapturedAudioSpectrumUpdate ↔ (void Function(List<double> audioSpectrum)?)
The local captured audio spectrum callback.
read / write
onCapturedDataRecordProgressUpdate ↔ (void Function(ZegoDataRecordProgress progress, ZegoDataRecordConfig config, ZegoPublishChannel channel)?)
The callback to report the current recording progress.
read / write
onCapturedDataRecordStateUpdate ↔ (void Function(ZegoDataRecordState state, int errorCode, ZegoDataRecordConfig config, ZegoPublishChannel channel)?)
The callback triggered when the state of data recording (to a file) changes.
read / write
onCapturedSoundLevelInfoUpdate ↔ (void Function(ZegoSoundLevelInfo soundLevelInfo)?)
The local captured audio sound level callback, supported vad.
read / write
onCapturedSoundLevelUpdate ↔ (void Function(double soundLevel)?)
The local captured audio sound level callback.
read / write
onCurrentPitchValueUpdate ↔ (void Function(ZegoCopyrightedMusic copyrightedMusic, String resourceID, int currentDuration, int pitchValue)?)
Real-time pitch line callback.
read / write
onDebugError ↔ (void Function(int errorCode, String funcName, String info)?)
The callback for obtaining debugging error information.
read / write
onDownloadProgressUpdate ↔ (void Function(ZegoCopyrightedMusic copyrightedMusic, String resourceID, double progressRate)?)
Callback for download song or accompaniment progress rate.
read / write
onEngineStateUpdate ↔ (void Function(ZegoEngineState state)?)
The callback triggered when the audio/video engine state changes.
read / write
onExceptionOccurred ↔ (void Function(ZegoScreenCaptureSource source, ZegoScreenCaptureSourceExceptionType exceptionType)?)
The callback triggered when a screen capture source exception occurred
read / write
onFatalError ↔ (void Function(int errorCode)?)
The callback that triggered a fatal error, causing the SDK to malfunction and unable to function properly.
read / write
onIMRecvBarrageMessage ↔ (void Function(String roomID, List<ZegoBarrageMessageInfo> messageList)?)
The callback triggered when Barrage Messages are received.
read / write
onIMRecvBroadcastMessage ↔ (void Function(String roomID, List<ZegoBroadcastMessageInfo> messageList)?)
The callback triggered when Broadcast Messages are received.
read / write
onIMRecvCustomCommand ↔ (void Function(String roomID, ZegoUser fromUser, String command)?)
The callback triggered when a Custom Command is received.
read / write
onLocalDeviceExceptionOccurred ↔ (void Function(ZegoDeviceExceptionType exceptionType, ZegoDeviceType deviceType, String deviceID)?)
The callback triggered when a local device exception occurred.
read / write
onMediaDataPublisherFileClose ↔ (void Function(ZegoMediaDataPublisher mediaDataPublisher, int errorCode, String path)?)
The event callback of the media data publisher closing a media file.
read / write
onMediaDataPublisherFileDataBegin ↔ (void Function(ZegoMediaDataPublisher mediaDataPublisher, String path)?)
The event callback that the media data publisher has read data from the media file.
read / write
onMediaDataPublisherFileDataEnd ↔ (void Function(ZegoMediaDataPublisher mediaDataPublisher, String path)?)
The event callback that the media data publisher has completed a file stream publishing.
read / write
onMediaDataPublisherFileOpen ↔ (void Function(ZegoMediaDataPublisher mediaDataPublisher, String path)?)
The event callback of the media data publisher opening a media file.
read / write
onMediaPlayerFirstFrameEvent ↔ (void Function(ZegoMediaPlayer mediaPlayer, ZegoMediaPlayerFirstFrameEvent event)?)
The callback triggered when the media player plays the first frame.
read / write
onMediaPlayerFrequencySpectrumUpdate ↔ (void Function(ZegoMediaPlayer mediaPlayer, List<double> spectrumList)?)
The callback of frequency spectrum update.
read / write
onMediaPlayerLocalCache ↔ (void Function(ZegoMediaPlayer mediaPlayer, int errorCode, String resource, String cachedFile)?)
The callback triggered when the media player caches http/https network resource locally.
read / write
onMediaPlayerNetworkEvent ↔ (void Function(ZegoMediaPlayer mediaPlayer, ZegoMediaPlayerNetworkEvent networkEvent)?)
The callback triggered when the network status of the media player changes.
read / write
onMediaPlayerPlayingProgress ↔ (void Function(ZegoMediaPlayer mediaPlayer, int millisecond)?)
The callback to report the current playback progress of the media player.
read / write
onMediaPlayerRecvSEI ↔ (void Function(ZegoMediaPlayer mediaPlayer, Uint8List data)?)
The callback triggered when the media player got media side info.
read / write
onMediaPlayerRenderingProgress ↔ (void Function(ZegoMediaPlayer mediaPlayer, int millisecond)?)
The callback to report the current rendering progress of the media player.
read / write
onMediaPlayerSoundLevelUpdate ↔ (void Function(ZegoMediaPlayer mediaPlayer, double soundLevel)?)
The callback of sound level update.
read / write
onMediaPlayerStateUpdate ↔ (void Function(ZegoMediaPlayer mediaPlayer, ZegoMediaPlayerState state, int errorCode)?)
MediaPlayer playback status callback.
read / write
onMediaPlayerVideoSizeChanged ↔ (void Function(ZegoMediaPlayer mediaPlayer, int width, int height)?)
The callback triggered when when the resolution of the playback video changes.
read / write
onMixedAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param)?)
Callback to get the audio data played by the SDK and the audio data captured by the local microphone. The audio data is the data mixed by the SDK.
read / write
onMixerRelayCDNStateUpdate ↔ (void Function(String taskID, List<ZegoStreamRelayCDNInfo> infoList)?)
The callback triggered when the state of relayed streaming of the mixed stream to CDN changes.
read / write
onMixerSoundLevelUpdate ↔ (void Function(Map<int, double> soundLevels)?)
The callback triggered when the sound level of any input stream changes in the stream mixing process.
read / write
onMobileScreenCaptureExceptionOccurred ↔ (void Function(ZegoScreenCaptureExceptionType exceptionType)?)
The callback triggered when a screen capture source exception occurred
read / write
onNetworkModeChanged ↔ (void Function(ZegoNetworkMode mode)?)
Network mode changed callback.
read / write
onNetworkQuality ↔ (void Function(String userID, ZegoStreamQualityLevel upstreamQuality, ZegoStreamQualityLevel downstreamQuality)?)
The network quality callback of users who are publishing in the room.
read / write
onNetworkSpeedTestError ↔ (void Function(int errorCode, ZegoNetworkSpeedTestType type)?)
Network speed test error callback.
read / write
onNetworkSpeedTestQualityUpdate ↔ (void Function(ZegoNetworkSpeedTestQuality quality, ZegoNetworkSpeedTestType type)?)
Network speed test quality callback.
read / write
onNetworkTimeSynchronized ↔ (void Function()?)
Successful callback of network time synchronization.
read / write
onPerformanceStatusUpdate ↔ (void Function(ZegoPerformanceStatus status)?)
System performance monitoring callback.
read / write
onPlaybackAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param)?)
The callback for obtaining the audio data of all the streams playback by SDK.
read / write
onPlayerAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param, String streamID)?)
The callback for obtaining the audio data of each stream.
read / write
onPlayerLowFpsWarning ↔ (void Function(ZegoVideoCodecID codecID, String streamID)?)
Playing stream low frame rate warning.
read / write
onPlayerMediaEvent ↔ (void Function(String streamID, ZegoPlayerMediaEvent event)?)
The callback triggered when a media event occurs during streaming playing.
read / write
onPlayerQualityUpdate ↔ (void Function(String streamID, ZegoPlayStreamQuality quality)?)
Callback for current stream playing quality.
read / write
onPlayerRecvAudioFirstFrame ↔ (void Function(String streamID)?)
The callback triggered when the first audio frame is received.
read / write
onPlayerRecvAudioSideInfo ↔ (void Function(String streamID, Uint8List data)?)
Receive the audio side information content of the remote stream.
read / write
onPlayerRecvMediaSideInfo ↔ (void Function(ZegoMediaSideInfo info)?)
The callback triggered when Supplemental Enhancement Information is received synchronously.
read / write
onPlayerRecvSEI ↔ (void Function(String streamID, Uint8List data)?)
The callback triggered when Supplemental Enhancement Information is received.
read / write
onPlayerRecvVideoFirstFrame ↔ (void Function(String streamID)?)
The callback triggered when the first video frame is received. Except for Linux systems, this callback is thrown from the ui thread by default.
read / write
onPlayerRenderCameraVideoFirstFrame ↔ (void Function(String streamID)?)
Calls back when the stream playing end renders the first frame of the video from the remote camera.
read / write
onPlayerRenderVideoFirstFrame ↔ (void Function(String streamID)?)
The callback triggered when the first video frame is rendered.
read / write
onPlayerStateUpdate ↔ (void Function(String streamID, ZegoPlayerState state, int errorCode, Map<String, dynamic> extendedData)?)
The callback triggered when the state of stream playing changes.
read / write
onPlayerStreamEvent ↔ (void Function(ZegoStreamEvent eventID, String streamID, String extraInfo)?)
The callback triggered when playing stream.
read / write
onPlayerVideoSizeChanged ↔ (void Function(String streamID, int width, int height)?)
The callback triggered when the stream playback resolution changes.
read / write
onPlayerVideoSuperResolutionUpdate ↔ (void Function(String streamID, ZegoSuperResolutionState state, int errorCode)?)
Playing stream video super resolution enabled state changes.
read / write
onProcessCapturedAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param, double timestamp)?)
Custom audio processing local captured PCM audio frame callback.
read / write
onProcessCapturedAudioDataAfterUsedHeadphoneMonitor ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param, double timestamp)?)
Custom audio processing local captured PCM audio frame callback after used headphone monitor.
read / write
onProcessPlaybackAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param, double timestamp)?)
Custom audio processing SDK playback PCM audio frame callback.
read / write
onProcessRemoteAudioData ↔ (void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param, String streamID, double timestamp)?)
Custom audio processing remote playing stream PCM audio frame callback.
read / write
onPublisherCapturedAudioFirstFrame ↔ (void Function()?)
The callback triggered when the first audio frame is captured.
read / write
onPublisherCapturedVideoFirstFrame ↔ (void Function(ZegoPublishChannel channel)?)
The callback triggered when the first video frame is captured.
read / write
onPublisherDummyCaptureImagePathError ↔ (void Function(int errorCode, String path, ZegoPublishChannel channel)?)
The notification for setting the path of the static image displayed when the camera is turned off is incorrect.
read / write
onPublisherLowFpsWarning ↔ (void Function(ZegoVideoCodecID codecID, ZegoPublishChannel channel)?)
Video encoding low frame rate warning.
read / write
onPublisherQualityUpdate ↔ (void Function(String streamID, ZegoPublishStreamQuality quality)?)
Callback for current stream publishing quality.
read / write
onPublisherRelayCDNStateUpdate ↔ (void Function(String streamID, List<ZegoStreamRelayCDNInfo> infoList)?)
The callback triggered when the state of relayed streaming to CDN changes.
read / write
onPublisherRenderVideoFirstFrame ↔ (void Function(ZegoPublishChannel channel)?)
The callback triggered when the first video frame is rendered.
read / write
onPublisherSendAudioFirstFrame ↔ (void Function(ZegoPublishChannel channel)?)
The callback triggered when the first audio frame is sent.
read / write
onPublisherSendVideoFirstFrame ↔ (void Function(ZegoPublishChannel channel)?)
The callback triggered when the first video frame is sent.
read / write
onPublisherStateUpdate ↔ (void Function(String streamID, ZegoPublisherState state, int errorCode, Map<String, dynamic> extendedData)?)
The callback triggered when the state of stream publishing changes.
read / write
onPublisherStreamEvent ↔ (void Function(ZegoStreamEvent eventID, String streamID, String extraInfo)?)
The callback triggered when publishing stream.
read / write
onPublisherVideoEncoderChanged ↔ (void Function(ZegoVideoCodecID fromCodecID, ZegoVideoCodecID toCodecID, ZegoPublishChannel channel)?)
The callback triggered when the video encoder changes in publishing stream.
read / write
onPublisherVideoSizeChanged ↔ (void Function(int width, int height, ZegoPublishChannel channel)?)
The callback triggered when the video capture resolution changes.
read / write
onRangeAudioMicrophoneStateUpdate ↔ (void Function(ZegoRangeAudio rangeAudio, ZegoRangeAudioMicrophoneState state, int errorCode)?)
Range audio microphone state callback.
read / write
onReceiveRealTimeSequentialData ↔ (void Function(ZegoRealTimeSequentialDataManager manager, Uint8List data, String streamID)?)
Callback for receiving real-time sequential data.
read / write
onRectChanged ↔ (void Function(ZegoScreenCaptureSource source, dynamic captureRect)?)
The callback will be triggered when the state of the capture target window change.
read / write
onRecvExperimentalAPI ↔ (void Function(String content)?)
Experimental API callback
read / write
onRecvRoomTransparentMessage ↔ (void Function(String roomID, ZegoRoomRecvTransparentMessage message)?)
The callback triggered when Barrage Messages are received.
read / write
onRemoteAudioSpectrumUpdate ↔ (void Function(Map<String, List<double>> audioSpectrums)?)
The remote playing streams audio spectrum callback.
read / write
onRemoteCameraStateUpdate ↔ (void Function(String streamID, ZegoRemoteDeviceState state)?)
The callback triggered when the state of the remote camera changes.
read / write
onRemoteMicStateUpdate ↔ (void Function(String streamID, ZegoRemoteDeviceState state)?)
The callback triggered when the state of the remote microphone changes.
read / write
onRemoteSoundLevelInfoUpdate ↔ (void Function(Map<String, ZegoSoundLevelInfo> soundLevelInfos)?)
The remote playing streams audio sound level callback, supported vad.
read / write
onRemoteSoundLevelUpdate ↔ (void Function(Map<String, double> soundLevels)?)
The remote playing streams audio sound level callback.
read / write
onRemoteSpeakerStateUpdate ↔ (void Function(String streamID, ZegoRemoteDeviceState state)?)
The callback triggered when the state of the remote speaker changes.
read / write
onRequestDumpData ↔ (void Function()?)
Request to dump data.
read / write
onRequestUploadDumpData ↔ (void Function(String dumpDir, bool takePhoto)?)
Request to dump data.
read / write
onRoomExtraInfoUpdate ↔ (void Function(String roomID, List<ZegoRoomExtraInfo> roomExtraInfoList)?)
The callback triggered when there is an update on the extra information of the room.
read / write
onRoomOnlineUserCountUpdate ↔ (void Function(String roomID, int count)?)
The callback triggered every 30 seconds to report the current number of online users.
read / write
onRoomStateChanged ↔ (void Function(String roomID, ZegoRoomStateChangedReason reason, int errorCode, Map<String, dynamic> extendedData)?)
Notification of the room connection state changes, including specific reasons for state change.
read / write
onRoomStateUpdate ↔ (void Function(String roomID, ZegoRoomState state, int errorCode, Map<String, dynamic> extendedData)?)
Notification of the room connection state changes.
read / write
onRoomStreamExtraInfoUpdate ↔ (void Function(String roomID, List<ZegoStream> streamList)?)
The callback triggered when there is an update on the extra information of the streams published by other users in the same room.
read / write
onRoomStreamUpdate ↔ (void Function(String roomID, ZegoUpdateType updateType, List<ZegoStream> streamList, Map<String, dynamic> extendedData)?)
The callback triggered when the number of streams published by the other users in the same room increases or decreases.
read / write
onRoomTokenWillExpire ↔ (void Function(String roomID, int remainTimeInSecond)?)
Callback notification that room Token authentication is about to expire.
read / write
onRoomUserUpdate ↔ (void Function(String roomID, ZegoUpdateType updateType, List<ZegoUser> userList)?)
The callback triggered when the number of other users in the room increases or decreases.
read / write
onStartDumpData ↔ (void Function(int errorCode)?)
Callback when starting to dump data.
read / write
onStopDumpData ↔ (void Function(int errorCode, String dumpDir)?)
Callback when stopping to dump data.
read / write
onUploadDumpData ↔ (void Function(int errorCode)?)
Callback after uploading the dump data.
read / write
onVideoDeviceStateChanged ↔ (void Function(ZegoUpdateType updateType, ZegoDeviceInfo deviceInfo)?)
The callback triggered when there is a change to video devices (i.e. new device added or existing device deleted).
read / write
onVideoObjectSegmentationStateChanged ↔ (void Function(ZegoObjectSegmentationState state, ZegoPublishChannel channel, int errorCode)?)
The video object segmentation state changed.
read / write
onWindowStateChanged ↔ (void Function(ZegoScreenCaptureSource source, ZegoScreenCaptureWindowState windowState, dynamic windowRect)?)
The callback will be triggered when the state of the capture target window change.
read / write

Static Methods

createEngine(int appID, String appSign, bool isTestEnv, ZegoScenario scenario, {bool? enablePlatformView}) → Future<void>
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.
createEngineWithProfile(ZegoEngineProfile profile) → Future<void>
Create ZegoExpressEngine singleton object and initialize SDK.
destroyEngine() → Future<void>
Destroy the ZegoExpressEngine singleton object and deinitialize the SDK.
getVersion() → Future<String>
Gets the SDK's version number.
isFeatureSupported(ZegoFeatureType featureType) → Future<bool>
Query whether the current SDK supports the specified feature.
setCloudProxyConfig(List<ZegoProxyInfo> proxyList, String token, bool enable) → Future<void>
Set cloud proxy config.
setEngineConfig(ZegoEngineConfig config) → Future<void>
Set advanced engine configuration.
setGeoFence(ZegoGeoFenceType type, List<int> areaList) → Future<void>
Set Geo Fence.
setLicense(String license) → Future<void>
Set license auth.
setLocalProxyConfig(List<ZegoProxyInfo> proxyList, bool enable) → Future<void>
Set local proxy config.
setLogConfig(ZegoLogConfig config) → Future<void>
Set log configuration.
setRoomMode(ZegoRoomMode mode) → Future<void>
Set room mode.
submitLog() → Future<void>
Uploads logs to the ZEGO server.