ZegoExpressDefines.h

Include By

  • ZegoExpressEventHandler.h
  • ZegoExpressEngine+MediaPlayer.h

Includes

  • Foundation/Foundation.h
  • CoreGraphics/CoreGraphics.h
  • AVFoundation/AVFoundation.h
  • ZegoExpressErrorCode.h
  • UIKit/UIKit.h

Inner Class

Z

Z

ZegoLogConfig ZegoCustomVideoCaptureConfig ZegoCustomVideoRenderConfig
ZegoEngineConfig ZegoRoomConfig ZegoVideoConfig
ZegoUser ZegoStream ZegoCanvas
ZegoPublishStreamQuality ZegoCDNConfig ZegoStreamRelayCDNInfo
ZegoPlayerConfig ZegoPlayStreamQuality ZegoDeviceInfo
ZegoBeautifyOption ZegoMixerAudioConfig ZegoMixerVideoConfig
ZegoMixerInput ZegoMixerOutput ZegoWatermark
ZegoMixerTask ZegoBroadcastMessageInfo ZegoBarrageMessageInfo
ZegoVideoFrameParam ZegoAudioFrameParam ZegoAudioConfig
ZegoMediaPlayer

Define Lists

Enum Lists

Typedef Lists

Define Docs

ZGView

Initial: ZGView UIView

ZGImage

Initial: ZGImage UIImage

Enum Docs

ZegoScenario

Application scenario.

Enumerator
ZegoScenarioGeneral General scenario.
ZegoScenarioCommunication Communication scenario.
ZegoScenarioLive Live scenario.

ZegoLanguage

Language.

Enumerator
ZegoLanguageEnglish English.
ZegoLanguageChinese Chinese.

ZegoRoomState

Room state.

Enumerator
ZegoRoomStateDisconnected Unconnected state, enter this state before logging in and after exiting the room. If there is a steady state abnormality in the process of logging in to the room, such as AppID and AppSign are incorrect, or if the same user name is logged in elsewhere and the local end is KickOut, it will enter this state.
ZegoRoomStateConnecting The state that the connection is being requested. It will enter this state after successful execution login room function. The display of the application interface is usually performed using this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting connection status.
ZegoRoomStateConnected The status that is successfully connected. Entering this status indicates that the login to the room has been successful. The user can receive the callback notification of the user and the stream information in the room.

ZegoPublishChannel

Publish channel.

Enumerator
ZegoPublishChannelMain Main publish channel.
ZegoPublishChannelAux Auxiliary publish channel.

ZegoViewMode

Video rendering mode.

Enumerator
ZegoViewModeAspectFit The proportional scaling up, there may be black borders.
ZegoViewModeAspectFill The proportional zoom fills the entire View and may be partially cut.
ZegoViewModeScaleToFill Fill the entire view, the image may be stretched.

ZegoVideoMirrorMode

Mirror mode for previewing or playing the of the stream.

Enumerator
ZegoVideoMirrorModeOnlyPreviewMirror The mirror image only for previewing locally. This mode is used by default.
ZegoVideoMirrorModeBothMirror Both the video previewed locally and the far end playing the stream will see mirror image.
ZegoVideoMirrorModeNoMirror Both the video previewed locally and the far end playing the stream will not see mirror image.
ZegoVideoMirrorModeOnlyPublishMirror The mirror image only for far end playing the stream.

ZegoPublisherState

Publish stream status.

Enumerator
ZegoPublisherStateNoPublish The state is not published, and it is in this state before publishing the stream. If a steady-state exception occurs in the publish process, such as AppID and AppSign are incorrect, or if other users are already publishing the stream, there will be a failure and enter this state.
ZegoPublisherStatePublishRequesting The state that it is requesting to publish the stream. After the publish stream interface is successfully called, and the application interface is usually displayed using the state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting state.
ZegoPublisherStatePublishing The state that the stream is being published, entering the state indicates that the stream has been successfully published, and the user can communicate normally.

ZegoVideoConfigPreset

Video configuration resolution and bitrate preset enumeration. The preset resolutions are adapted for mobile and desktop. On mobile, height is longer than width, and desktop is the opposite. For example, 1080p is actually 1080(w) x 1920(h) on mobile and 1920(w) x 1080(h) on desktop.

Enumerator
ZegoVideoConfigPreset180P Set the resolution to 320x180, the default is 15 fps, the code rate is 300 kbps.
ZegoVideoConfigPreset270P Set the resolution to 480x270, the default is 15 fps, the code rate is 400 kbps.
ZegoVideoConfigPreset360P Set the resolution to 640x360, the default is 15 fps, the code rate is 600 kbps.
ZegoVideoConfigPreset540P Set the resolution to 960x540, the default is 15 fps, the code rate is 1200 kbps.
ZegoVideoConfigPreset720P Set the resolution to 1280x720, the default is 15 fps, the code rate is 1500 kbps.
ZegoVideoConfigPreset1080P Set the resolution to 1920x1080, the default is 15 fps, the code rate is 3000 kbps.

ZegoStreamQualityLevel

Stream quality level.

Enumerator
ZegoStreamQualityLevelExcellent Excellent.
ZegoStreamQualityLevelGood Good.
ZegoStreamQualityLevelMedium Normal.
ZegoStreamQualityLevelBad Bad.
ZegoStreamQualityLevelDie Failed.

ZegoAudioChannel

Audio channel type.

Enumerator
ZegoAudioChannelMono MONO.
ZegoAudioChannelStereo STEREO.

ZegoAudioCodecID

Audio Codec ID.

Enumerator
ZegoAudioCodecIDDefault default
ZegoAudioCodecIDNormal Normal.
ZegoAudioCodecIDNormal2 Normal2.
ZegoAudioCodecIDNormal3 Normal3.
ZegoAudioCodecIDLow Low.
ZegoAudioCodecIDLow2 Low2.
ZegoAudioCodecIDLow3 Low3.

ZegoVideoCodecID

Video Codec ID.

Enumerator
ZegoVideoCodecIDDefault default
ZegoVideoCodecIDSVC SVC.
ZegoVideoCodecIDVP8 VP8.

ZegoPlayerVideoLayer

Player video layer.

Enumerator
ZegoPlayerVideoLayerAuto The layer to be played depends on the network status.
ZegoPlayerVideoLayerBase Play the base layer (small resolution)
ZegoPlayerVideoLayerBaseExtend Play the extend layer (big resolution)

ZegoAECMode

Audio echo cancellation mode.

Enumerator
ZegoAECModeAggressive Aggressive echo cancellation may affect the sound quality slightly, but the echo will be very clean.
ZegoAECModeMedium Moderate echo cancellation, which may slightly affect a little bit of sound, but the residual echo will be less.
ZegoAECModeSoft Comfortable echo cancellation, that is, echo cancellation does not affect the sound quality of the sound, and sometimes there may be a little echo, but it will not affect the normal listening.

ZegoTrafficControlProperty

Traffic control property (bitmask enumeration)

Enumerator
ZegoTrafficControlPropertyBasic Basic.
ZegoTrafficControlPropertyAdaptiveFPS Adaptive FPS.
ZegoTrafficControlPropertyAdaptiveResolution Adaptive resolution.
ZegoTrafficControlPropertyAdaptiveAudioBitrate Adaptive Audio bitrate.

ZegoTrafficControlMinVideoBitrateMode

Video transmission mode when current bitrate is lower than the set minimum bitrate.

Enumerator
ZegoTrafficControlMinVideoBitrateModeNoVideo Stop video transmission when current bitrate is lower than the set minimum bitrate.
ZegoTrafficControlMinVideoBitrateModeUltraLowFPS Video is sent at a very low frequency (no more than 2fps) which is lower than the set minimum bitrate.

ZegoPlayerState

Playing stream status.

Enumerator
ZegoPlayerStateNoPlay The state of the flow is not played, and it is in this state before the stream is played. If the steady flow anomaly occurs during the playing process, such as AppID and AppSign are incorrect, it will enter this state.
ZegoPlayerStatePlayRequesting The state that the stream is being requested for playing. After the stream playing interface is successfully called, it will enter the state, and the application interface is usually displayed using this state. If the connection is interrupted due to poor network quality, the SDK will perform an internal retry and will return to the requesting state.
ZegoPlayerStatePlaying The state that the stream is being playing, entering the state indicates that the stream has been successfully played, and the user can communicate normally.

ZegoPlayerMediaEvent

Media event when playing.

Enumerator
ZegoPlayerMediaEventAudioBreakOccur Audio stuck event when playing.
ZegoPlayerMediaEventAudioBreakResume Audio stuck event recovery when playing.
ZegoPlayerMediaEventVideoBreakOccur Video stuck event when playing.
ZegoPlayerMediaEventVideoBreakResume Video stuck event recovery when playing.

ZegoUpdateType

Update type.

Enumerator
ZegoUpdateTypeAdd Add.
ZegoUpdateTypeDelete Delete.

ZegoStreamRelayCDNState

State of CDN relay.

Enumerator
ZegoStreamRelayCDNStateNoRelay The state indicates that there is no CDN relay.
ZegoStreamRelayCDNStateRelayRequesting The CDN relay is being requested.
ZegoStreamRelayCDNStateRelaying Entering this status indicates that the CDN relay has been successful.

ZegoStreamRelayCDNUpdateReason

Reason for state of CDN relay changed.

Enumerator
ZegoStreamRelayCDNUpdateReasonNone No error.
ZegoStreamRelayCDNUpdateReasonServerError Server error.
ZegoStreamRelayCDNUpdateReasonHandshakeFailed Handshake error.
ZegoStreamRelayCDNUpdateReasonAccessPointError Access point error.
ZegoStreamRelayCDNUpdateReasonCreateStreamFailed Stream create failure.
ZegoStreamRelayCDNUpdateReasonBadName Bad name.
ZegoStreamRelayCDNUpdateReasonCDNServerDisconnected CDN server actively disconnected.
ZegoStreamRelayCDNUpdateReasonDisconnected Active disconnect.

ZegoBeautifyFeature

Beauty feature (bitmask enumeration)

Enumerator
ZegoBeautifyFeatureNone No beautifying.
ZegoBeautifyFeaturePolish Polish.
ZegoBeautifyFeatureWhiten Sharpen.
ZegoBeautifyFeatureSkinWhiten Skin whiten.
ZegoBeautifyFeatureSharpen Whiten.

ZegoRemoteDeviceState

Remote device status.

Enumerator
ZegoRemoteDeviceStateOpen Device on.
ZegoRemoteDeviceStateGenericError General device error.
ZegoRemoteDeviceStateInvalidID Invalid device ID.
ZegoRemoteDeviceStateNoAuthorization No permission.
ZegoRemoteDeviceStateZeroFPS Captured frame rate is 0.
ZegoRemoteDeviceStateInUseByOther The device is occupied.
ZegoRemoteDeviceStateUnplugged The device is not plugged in or unplugged.
ZegoRemoteDeviceStateRebootRequired The system needs to be restarted.
ZegoRemoteDeviceStateSystemMediaServicesLost System media services stop, such as under the iOS platform, when the system detects that the current pressure is huge (such as playing a lot of animation), it is possible to disable all media related services.
ZegoRemoteDeviceStateDisable Capturing disabled.
ZegoRemoteDeviceStateMute The remote device is muted.
ZegoRemoteDeviceStateInterruption The device is interrupted, such as a phone call interruption, etc.
ZegoRemoteDeviceStateInBackground There are multiple apps at the same time in the foreground, such as the iPad app split screen, the system will prohibit all apps from using the camera.
ZegoRemoteDeviceStateMultiForegroundApp CDN server actively disconnected.
ZegoRemoteDeviceStateBySystemPressure The system is under high load pressure and may cause abnormal equipment.

ZegoAudioDeviceType

Audio device type.

Enumerator
ZegoAudioDeviceTypeInput Audio input type.
ZegoAudioDeviceTypeOutput Audio output type.

ZegoMixerInputContentType

Mix stream content type.

Enumerator
ZegoMixerInputContentTypeAudio Mix stream for audio only.
ZegoMixerInputContentTypeVideo Mix stream for both audio and video.

ZegoCapturePipelineScaleMode

Capture pipeline scale mode.

Enumerator
ZegoCapturePipelineScaleModePre Zoom immediately after acquisition, default.
ZegoCapturePipelineScaleModePost Scaling while encoding.

ZegoVideoFrameFormat

Video frame format.

Enumerator
ZegoVideoFrameFormatUnknown Unknown format, will take platform default.
ZegoVideoFrameFormatI420 I420 (YUV420Planar) format.
ZegoVideoFrameFormatNV12 NV12 (YUV420SemiPlanar) format.
ZegoVideoFrameFormatNV21 NV21 (YUV420SemiPlanar) format.
ZegoVideoFrameFormatBGRA32 BGRA32 format.
ZegoVideoFrameFormatRGBA32 RGBA32 format.
ZegoVideoFrameFormatARGB32 ARGB32 format.
ZegoVideoFrameFormatABGR32 ABGR32 format.
ZegoVideoFrameFormatI422 I422 (YUV422Planar) format.

ZegoVideoBufferType

Video frame buffer type.

Enumerator
ZegoVideoBufferTypeUnknown Raw data type video frame.
ZegoVideoBufferTypeRawData Raw data type video frame.
ZegoVideoBufferTypeGLTexture2D Texture 2D type video frame.
ZegoVideoBufferTypeCVPixelBuffer CVPixelBuffer type video frame.

ZegoVideoFrameFormatSeries

Video frame format series.

Enumerator
ZegoVideoFrameFormatSeriesRGB RGB series.
ZegoVideoFrameFormatSeriesYUV YUV series.

ZegoVideoFlipMode

Video frame flip mode.

Enumerator
ZegoVideoFlipModeNone No flip.
ZegoVideoFlipModeX X-axis flip.

ZegoAudioConfigPreset

Audio Config Preset.

Enumerator
ZegoAudioConfigPresetBasicQuality basic-quality
ZegoAudioConfigPresetStandardQuality standard-quality
ZegoAudioConfigPresetStandardQualityStereo standard-quality-stereo
ZegoAudioConfigPresetHighQuality high-quality
ZegoAudioConfigPresetHighQualityStereo high-quality-stereo

ZegoMediaPlayerState

Player state.

Enumerator
ZegoMediaPlayerStateNoPlay Not playing.
ZegoMediaPlayerStatePlaying Playing.
ZegoMediaPlayerStatePausing Pausing.
ZegoMediaPlayerStatePlayEnded End of play.

ZegoMediaPlayerNetworkEvent

Player network event.

Enumerator
ZegoMediaPlayerNetworkEventBufferBegin Network resources are not playing well, and start trying to cache data.
ZegoMediaPlayerNetworkEventBufferEnded Network resources can be played smoothly.

Typedef Docs

ZegoDestroyCompletionCallback

public void(^ ZegoDestroyCompletionCallback ()

Callback for asynchronous destruction completion.

ZegoPublisherSetStreamExtraInfoCallback

public void(^ ZegoPublisherSetStreamExtraInfoCallback ()

Callback for updating stream extra information.

Parameters
errorCode Error code, please refer to the common error code document [] for details

ZegoPublisherUpdateCdnUrlCallback

public void(^ ZegoPublisherUpdateCdnUrlCallback ()

Callback for add/remove CDN URL.

Parameters
errorCode Error code, please refer to the common error code document [] for details

ZegoMixerStartCallback

public void(^ ZegoMixerStartCallback ()

Results of starting a mixer task.

Parameters
errorCode Error code, please refer to the common error code document [] for details
extendedData Extended Information

ZegoMixerStopCallback

public void(^ ZegoMixerStopCallback ()

Results of stoping a mixer task.

Parameters
errorCode Error code, please refer to the common error code document [] for details

ZegoIMSendBroadcastMessageCallback

public void(^ ZegoIMSendBroadcastMessageCallback ()

Callback for sending broadcast messages.

Parameters
errorCode Error code, please refer to the common error code document [] for details
messageID ID of this message

ZegoIMSendBarrageMessageCallback

public void(^ ZegoIMSendBarrageMessageCallback ()

Callback for sending barrage message.

Parameters
errorCode Error code, please refer to the common error code document [] for details
messageID ID of this message

ZegoIMSendCustomCommandCallback

public void(^ ZegoIMSendCustomCommandCallback ()

Callback for sending custom command.

Parameters
errorCode Error code, please refer to the common error code document [] for details

ZegoMediaPlayerLoadResourceCallback

public void(^ ZegoMediaPlayerLoadResourceCallback ()

Callback for media player loads resources.

Parameters
errorCode Error code, please refer to the common error code document [] for details

ZegoMediaPlayerSeekToCallback

public void(^ ZegoMediaPlayerSeekToCallback ()

Callback for media player seek to playback progress.

Parameters
errorCode Error code, please refer to the common error code document [] for details