Struct
ZegoAccurateSeekConfig
Precise seek configuration
Declared in ZegoDefine.cs
Properties
timeout
public ulong timeoutThe timeout time for precise search; if not set, the SDK internal default is set to 5000 milliseconds, the effective value range is [2000, 10000], the unit is ms
Methods
ZegoAccurateSeekConfig
ZegoAudioConfig
Audio configuration.
Details
Configure audio bitrate, audio channel, audio encoding for publishing stream
Declared in ZegoDefine.cs
Properties
bitrate
public int bitrateAudio bitrate in kbps, default is 48 kbps. The settings before and after publishing stream can be effective
channel
public ZegoAudioChannel channelAudio channel, default is Mono. The setting only take effect before publishing stream
codecID
public ZegoAudioCodecID codecIDcodec ID, default is ZegoAudioCodecIDDefault. The setting only take effect before publishing stream.WebGL does not support Settings.
Methods
ZegoAudioConfig
public void ZegoAudioConfig:this(ZegoAudioConfigPreset.StandardQuality)ZegoDefine.csZegoAudioConfig
public void ZegoAudioConfig(ZegoAudioConfigPreset presetType)ZegoDefine.csZegoAudioEffectPlayConfig
AudioEffectPlayer play configuration.
Declared in ZegoDefine.cs
Properties
playCount
public uint playCountThe number of play counts. When set to 0, it will play in an infinite loop until the user invoke [stop]. The default is 1, which means it will play only once.
isPublishOut
public bool isPublishOutWhether to mix audio effects into the publishing stream, the default is false.
ZegoAudioFrameParam
Parameter object for audio frame.
Details
Including the sampling rate and channel of the audio frame
Declared in ZegoDefine.cs
Properties
sampleRate
channel
ZegoAutoMixerTask
Auto mix stream task object.
Details
When using [StartAutoMixerTask] function to start an auto stream mixing task to the ZEGO RTC server, user need to set this parameter to configure the auto stream mixing task, including the task ID, room ID, audio configuration, output stream list, and whether to enable the sound level callback.
- Use cases: This configuration is required when an auto stream mixing task is requested to the ZEGO RTC server.
- Caution: As an argument passed when [StartAutoMixerTask] function is called.
Declared in ZegoDefine.cs
Properties
taskID
public string taskIDAuto stream mixing task id, must be unique in a room.
- Use cases: User need to set this parameter when initiating an auto stream mixing task.
- Required: Yes.
- Recommended value: Set this parameter based on requirements.
- Value range: A string up to 256 bytes.
- Caution: When starting a new auto stream mixing task, only one auto stream mixing task ID can exist in a room, that is, to ensure the uniqueness of task ID. You are advised to associate task ID with room ID. You can directly use the room ID as the task ID.Cannot include URL keywords, for example, 'http' and '?' etc, otherwise publishing stream and playing stream will fail. Only support numbers, English characters and '~', '!', '@', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '/', ''.
roomID
public string roomIDAuto stream mixing task id.
- Use cases: User need to set this parameter when initiating an auto stream mixing task.
- Required: Yes.
- Recommended value: Set this parameter based on requirements.
- Value range: A string up to 128 bytes.
- Caution: Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', ''.If you need to communicate with the Web SDK, please do not use '%'.
audioConfig
public ZegoMixerAudioConfig audioConfigThe audio config of the auto mixer task.
- Use cases: If user needs special requirements for the audio config of the auto stream mixing task, such as adjusting the audio bitrate, user can set this parameter as required. Otherwise, user do not need to set this parameter.
- Required: No.
- Default value: The default audio bitrate is
48 kbps, the default audio channel isZEGO_AUDIO_CHANNEL_MONO, the default encoding ID isZEGO_AUDIO_CODEC_ID_DEFAULT, and the default multi-channel audio stream mixing mode isZEGO_AUDIO_MIX_MODE_RAW. - Recommended value: Set this parameter based on requirements.
outputList
public List<ZegoMixerOutput> outputListThe output list of the auto stream mixing task, items in the list are URL or stream ID, if the item set to be URL format, only RTMP URL surpported, for example rtmp://xxxxxxxx.
- Use cases: User need to set this parameter to specify the mix stream output target when starting an auto stream mixing task.
- Required: Yes.
enableSoundLevel
public bool enableSoundLevelEnable or disable sound level callback for the task.If enabled, then the remote player can get the sound level of every stream in the inputlist by [onAutoMixerSoundLevelUpdate] callback.
- Use cases: This parameter needs to be configured if user need the sound level information of every stream when an auto stream mixing task started.
- Required: No.
- Default value:
false. - Recommended value: Set this parameter based on requirements.
streamAlignmentMode
Methods
ZegoAutoMixerTask
public void ZegoAutoMixerTask()ZegoDefine.csZegoBarrageMessageInfo
Barrage message info.
Details
The received object of the room barrage message, including the message content, message ID, sender, sending time
Declared in ZegoDefine.cs
Properties
message
public string messagemessage content
messageID
public string messageIDmessage id
sendTime
public ulong sendTimeMessage send time, UNIX timestamp, in milliseconds.
fromUser
public ZegoUser fromUserMessage sender.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
ZegoBeautifyOption
Beauty configuration options.
Details
Configure the parameters of skin peeling, whitening and sharpening
Declared in ZegoDefine.cs
Properties
polishStep
public double polishStepThe sample step size of beauty peeling, the value range is [0,1], default 0.2
whitenFactor
public double whitenFactorBrightness parameter for beauty and whitening, the larger the value, the brighter the brightness, ranging from [0,1], default 0.5
sharpenFactor
public double sharpenFactorBeauty sharpening parameter, the larger the value, the stronger the sharpening, value range [0,1], default 0.1
ZegoBroadcastMessageInfo
Broadcast message info.
Details
The received object of the room broadcast message, including the message content, message ID, sender, sending time
Declared in ZegoDefine.cs
Properties
message
public string messagemessage content
messageID
public ulong messageIDmessage id
sendTime
public ulong sendTimeMessage send time, UNIX timestamp, in milliseconds.
fromUser
public ZegoUser fromUserMessage sender.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
ZegoCDNConfig
CDN config object.
Details
Includes CDN URL and authentication parameter string
Declared in ZegoDefine.cs
Properties
url
public string urlCDN URL
authParam
public string authParamAuth param of URL. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored (set to null or empty string).
protocol
public string protocolURL supported protocols, candidate values are "tcp" and "quic". If there are more than one, separate them with English commas and try them in order. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored (set to null or empty string).
quicVersion
public string quicVersionQUIC version。 If [protocol] has the QUIC protocol, this information needs to be filled in. If there are multiple version numbers, separate them with commas. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored (set to null or empty string).
httpdns
public ZegoHttpDNSType httpdnscustomized httpdns service. This feature is only supported for playing stream currently.
quicConnectMode
public int quicConnectModeQUIC establishes link mode. If the value is 1, quic 0 rtt is used preferentially to establish link. Otherwise, the link is established normally. If [protocol] has the QUIC protocol, this value takes effect.
customParams
public string customParamscustom param of URL. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored (set to null or empty string).
Methods
ZegoCDNConfig
ZegoCanvas
View object.
Details
Configure view object, view Mode, background color
Declared in ZegoDefine.cs
Properties
view
public IntPtr viewView object
viewMode
backgroundColor
public int backgroundColorBackground color, the format is 0xRRGGBB, default is black, which is 0x000000
ZegoCopyrightedMusicConfig
CopyrightedMusic play configuration.
Declared in ZegoDefine.cs
Properties
user
public ZegoUser userUser object instance, configure userID, userName. that the user ID set here needs to be consistent with the user ID set when logging in to the room, otherwise the request for the copyright music background service will fail.
ZegoCopyrightedMusicRequestConfig
The configuration of requesting resource.
Declared in ZegoDefine.cs
Properties
songID
public string songIDthe ID of the song.
mode
vendorID
public ZegoCopyrightedMusicVendorID vendorIDCopyright music resource song copyright provider.
roomID
public string roomIDThe room ID, the single-room mode can not be passed, and the corresponding room ID must be passed in the multi-room mode. Indicate in which room to order song/accompaniment/accompaniment clip/accompaniment segment.
masterID
public string masterIDThe master ID, which must be passed when the billing mode is billed by host. Indicate which homeowner to order song/accompaniment/accompaniment clip/accompaniment segment.
sceneID
public int sceneIDThe scene ID, indicate the actual business. For details, please consult ZEGO technical support.
ZegoCopyrightedMusicRequestConfigV2
The configuration of requesting resource.
Declared in ZegoDefine.cs
Properties
songID
public string songIDthe ID of the song.
mode
public int modeVOD billing mode. Refer to the value of [ZegoCopyrightedMusicBillingMode].
vendorID
public int vendorIDCopyright music resource song copyright provider. Refer to the value of [ZegoCopyrightedMusicVendorID].
roomID
public string roomIDThe room ID, the single-room mode can not be passed, and the corresponding room ID must be passed in the multi-room mode. Indicate in which room to order song/accompaniment/accompaniment clip/accompaniment segment.
masterID
public string masterIDThe master ID, which must be passed when the billing mode is billed by host. Indicate which homeowner to order song/accompaniment/accompaniment clip/accompaniment segment.
sceneID
public int sceneIDThe scene ID, indicate the actual business. For details, please consult ZEGO technical support.
resourceType
public int resourceTypeThe resource type of music. Refer to the value of [ZegoCopyrightedMusicResourceType].
ZegoCustomAudioConfig
Custom audio configuration.
Declared in ZegoDefine.cs
Properties
sourceType
ZegoCustomVideoCaptureConfig
Custom video capture configuration.
Details
Custom video capture, that is, the developer is responsible for collecting video data and sending the collected video data to SDK for video data encoding and publishing to the ZEGO RTC server. This feature is generally used by developers who use third-party beauty features or record game screen living. When you need to use the custom video capture function, you need to set an instance of this class as a parameter to the [enableCustomVideoCapture] function. Because when using custom video capture, SDK will no longer start the camera to capture video data. You need to collect video data from video sources by yourself.
Declared in ZegoDefine.cs
Properties
bufferType
ZegoCustomVideoProcessConfig
Custom video process configuration.
Declared in ZegoDefine.cs
Properties
bufferType
ZegoCustomVideoRenderConfig
Custom video render configuration.
Details
When you need to use the custom video render function, you need to set an instance of this class as a parameter to the [enableCustomVideoRender] function.
Declared in ZegoDefine.cs
Properties
bufferType
frameFormatSeries
public ZegoVideoFrameFormatSeries frameFormatSeriesCustom video rendering video frame data format。Useless when set bufferType as [EncodedData]
enableEngineRender
public bool enableEngineRenderWhether the engine also renders while customizing video rendering. The default value is [false]. Useless when set bufferType as [EncodedData]
ZegoDataRecordConfig
Record config.
Declared in ZegoDefine.cs
Properties
filePath
public string filePathThe path to save the recording file, absolute path, need to include the file name, the file name need to specify the suffix, currently supports .mp4/.flv/.aac format files, if multiple recording for the same path, will overwrite the file with the same name. The maximum length should be less than 1024 bytes.
recordType
Methods
ZegoDataRecordConfig
ZegoDataRecordProgress
File recording progress.
Declared in ZegoDefine.cs
Properties
duration
public ulong durationCurrent recording duration in milliseconds
currentFileSize
public ulong currentFileSizeCurrent recording file size in byte
quality
ZegoDeviceInfo
Device Info.
Details
Including device ID and name
Declared in ZegoDefine.cs
Properties
deviceID
public string deviceIDDevice ID
deviceName
public string deviceNameDevice name
ZegoEngineConfig
Advanced engine configuration.
Declared in ZegoDefine.cs
Properties
logConfig
public ZegoLogConfig logConfigLog configuration, if not set, use the default configuration. It must be set before calling [createEngine] to take effect. If it is set after [createEngine], it will take effect at the next [createEngine] after [destroyEngine].
advancedConfig
public Dictionary<string, string> advancedConfigOther special function switches, if not set, no special function will be used by default. Please contact ZEGO technical support before use.
ZegoEngineProfile
Profile for create engine
Details
Profile for create engine
Declared in ZegoDefine.cs
Properties
appID
public uint appIDApplication ID issued by ZEGO for developers, please apply from the ZEGO Admin Console https://console.zegocloud.com The value ranges from 0 to 4294967295.
appSign
public string appSignApplication signature for each AppID, please apply from the ZEGO Admin Console. Application signature is a 64 character string. Each character has a range of '0' ~ '9', 'a' ~ 'z'. AppSign 2.17.0 and later allows null or no transmission. If the token is passed empty or not passed, the token must be entered in the [ZegoRoomConfig] parameter for authentication when the [loginRoom] interface is called to login to the room.
scenario
public ZegoScenario scenarioThe room scenario. the SDK will optimize the audio and video configuration for the specified scenario to achieve the best effect in this scenario. After specifying the scenario, you can call other APIs to adjusting the audio and video configuration. Differences between scenarios and how to choose a suitable scenario, please refer to https://docs.zegocloud.com/article/14940
Methods
ZegoEngineProfile
ZegoFontStyle
Font style.
Details
Font style configuration, can be used to configure font type, font size, font color, font transparency.
- Use cases: Set text watermark in manual stream mixing scene, such as Co-hosting.
Declared in ZegoDefine.cs
Properties
type
public ZegoFontType type- Required: False.
- Default value: Source han sans [ZegoFontTypeSourceHanSans]
size
public int size- Required: False.
- Default value: 24.
- Value range: [12,100].
color
public int color- Required: False.
- Default value: 16777215(white).
- Value range: [0,16777215].
transparency
public int transparency- Required: False.
- Default value: 0.
- Value range: [0,100], 100 is completely opaque, 0 is completely transparent.
border
public bool border- Required: False.
- Default value: False.
- Value range: True/False.
borderColor
public int borderColor- Required: False.
- Default value: 0.
- Value range: [0,16777215].
Methods
ZegoFontStyle
ZegoLabelInfo
Label info.
Details
Font style configuration, can be used to configure font type, font si-e, font color, font transparency.
- Use cases: Set text watermark in manual stream mixing scene, such as Co-hosting.
Declared in ZegoDefine.cs
Properties
text
public string text- Required: True.
- Value range: Maximum support for displaying 100 Chinese characters and 300 English characters.
left
public int left- Required: False.
- Default value: 0.
top
public int top- Required: False.
- Default value: 0.
font
Methods
ZegoLabelInfo
ZegoLogConfig
Log config.
Details
This parameter is required when calling [setlogconfig] to customize log configuration.
- Use cases: This configuration is required when you need to customize the log storage path or the maximum log file size.
- Caution: None.
Declared in ZegoDefine.cs
Properties
logPath
public string logPathUsed to customize the storage path of the log file.
- Use cases: This configuration is required when you need to customize the log storage path.
- Required: False.
- Default value: The default path of each platform is different, please refer to the official website document https://docs.zegocloud.com/faq/express_sdkLog.
- Caution: Developers need to ensure read and write permissions for files under this path.
logSize
public ulong logSizeUsed to customize the maximum log file size.
- Use cases: This configuration is required when you need to customize the upper limit of the log file size.
- Required: False.
- Default value: 5MB (5 * 1024 * 1024 Bytes).
- Value range: Minimum 1MB (1 * 1024 * 1024 Bytes), maximum 100M (100 * 1024 * 1024 Bytes), 0 means no need to write logs.
- Caution: The larger the upper limit of the log file size, the more log information it carries, but the log upload time will be longer.
logCount
public uint logCountLog files count. Default is 3. Value range is [3, 20].
logLevel
public string logLevelLocal log level. Only valid for web. The higher the level, the fewer logs will be printed. Available values: 'debug' | 'info' | 'warn' | 'error' | 'report' | 'disable'
Methods
ZegoLogConfig
ZegoMixerAudioConfig
Mix stream audio configuration.
Details
Configure video frame rate, bitrate, and resolution for mixer task
Declared in ZegoDefine.cs
Properties
bitrate
public int bitrateAudio bitrate in kbps, default is 48 kbps, cannot be modified after starting a mixer task
channel
codecID
mixMode
public ZegoAudioMixMode mixModeMulti-channel audio stream mixing mode. If [ZegoAudioMixMode] is selected as [Focused], the SDK will select 4 input streams with [isAudioFocus] set as the focus voice highlight. If it is not selected or less than 4 channels are selected, it will automatically fill in 4 channels. On web platforms, this property does not take effect.
Methods
ZegoMixerAudioConfig
ZegoMixerImageInfo
Set the image information of a single input stream in the mux.
Details
Sets a picture for the content of a single input stream, which is used in place of the video, i.e. the video is not displayed when the picture is used. The layout layout in [ZegoMixerInput] for image multiplexing.
Use case: The developer needs to temporarily turn off the camera to display the image during the video connection to the microphone, or display the picture when the audio is connected to the microphone.
- Available since: 2.19.0
- Restrictions: Image size is limited to 1M.
Declared in ZegoDefine.cs
Properties
url
public string urlThe image path, if not empty, the image will be displayed, otherwise, the video will be displayed. JPG and PNG formats are supported. There are 2 ways to use it: 1. URI: Provide the picture to ZEGO technical support for configuration. After the configuration is complete, the picture URI will be provided, for example: preset-id://xxx.jpg. 2. URL: Only HTTP protocol is supported.
displayMode
public int displayModeImage display mode. 0: Default. Use image to replace video content when url is not null. 1: Display image based on camera status. Display image when camera is turned off. Display video content when camera is turned on (no need to clear the url parameter). 2: Display image based on the input stream has video data or not. Display image when there is no video data in the input stream for 3 consecutive seconds. The default duration for judging that there is no video data is 3 seconds. If you need change this setting, please contact ZEGO technical support. Display video content when the input stream has video data.
Methods
ZegoMixerImageInfo
ZegoMixerImageInfo
public void ZegoMixerImageInfo(string url, int displayMode)ZegoDefine.csZegoMixerInput
Mixer input.
Details
Configure the mix stream input stream ID, type, and the layout
Declared in ZegoDefine.cs
Properties
streamID
public string streamID- Caution: You cannot include URL keywords, otherwise publishing stream and playing stream will fails. Only support numbers, English characters and '-', '_'.
contentType
layout
public ZegoRect layoutStream layout. When the mixed stream is an audio stream (that is, the ContentType parameter is set to the audio mixed stream type). Developers do not need to assign a value to this field, just use the SDK default.
soundLevelID
public uint soundLevelIDIf enable soundLevel in mix stream task, an unique soundLevelID is need for every stream
volume
public uint volumeInput stream volume, valid range [0, 200], default is 100.
isAudioFocus
public bool isAudioFocusWhether the focus voice is enabled in the current input stream, the sound of this stream will be highlighted if enabled.
audioDirection
public int audioDirectionThe direction of the audio. Valid direction is between 0 to 360. Set -1 means disable. Default value is -1. On web platforms, this property does not take effect.
label
renderMode
imageInfo
cornerRadius
public uint cornerRadiusVideo frame corner radius, in px.
- Required: False.
- Value range: Does not exceed the width and height of the video screen set by the [layout] parameter.
- Default value: 0.
advancedConfig
public Dictionary<string, string> advancedConfigSet advanced configuration. Please contact ZEGO technical support. On web platforms, this property does not take effect.
Methods
ZegoMixerInput
public void ZegoMixerInput(string streamID, ZegoMixerInputContentType contentType, ZegoRect layout)ZegoDefine.csZegoMixerInput
public void ZegoMixerInput(string streamID, ZegoMixerInputContentType contentType, ZegoRect layout, uint soundLevelID)ZegoDefine.csZegoMixerOutput
Mixer output object, currently, a mixed-stream task only supports a maximum of four video streams with different resolutions.
Details
Configure mix stream output target URL or stream ID
Declared in ZegoDefine.cs
Properties
target
public string targetMix stream output target, URL or stream ID, if set to be URL format, only RTMP URL surpported, for example rtmp://xxxxxxxx, addresses with two identical mixed-stream outputs cannot be passed in.
videoConfig
public ZegoMixerOutputVideoConfig videoConfigMix stream output video config. On web platforms, this property does not take effect.
targetRoom
public ZegoMixerOutputRoomInfo targetRoomSpecifies the room information for the output stream.
Methods
ZegoMixerOutput
ZegoMixerOutputRoomInfo
Room information for the output stream in a mixed stream.
Details
Setting room information for a single output stream; the mixed output stream can be added to the specified room, allowing users in the room to receive notifications of increased stream in the room.
- Use cases: Manual mixed stream scenario, such as Co-hosting.
- Available since: 3.18.0
- Restrictions: Dynamic updates during mixed stream are not supported.
Declared in ZegoDefine.cs
Properties
roomID
public string roomIDSpecifies the room ID of the output stream. You need to ensure that the room is already present when mixing starts.
userID
public string userIDSpecifies the user ID of the output stream. It is not recommended to use the same userID as the actual user in the room to avoid conflicts with the SDK's stream addition behavior.
Methods
ZegoMixerOutputRoomInfo
public void ZegoMixerOutputRoomInfo(String roomID, String userID)ZegoDefine.csZegoMixerOutputVideoConfig
Mix stream output video config object.
Details
Configure the video parameters, coding format and bitrate of mix stream output.
- Use cases: Manual mixed stream scenario, such as Co-hosting.
Declared in ZegoDefine.cs
Properties
videoCodecID
public ZegoVideoCodecID videoCodecIDMix stream output video coding format, supporting H.264 and h.265 coding.
bitrate
public int bitrateMix stream output video bitrate in kbps. The default value is the bitrate configured in [ZegoMixerVideoConfig].
encodeProfile
public ZegoEncodeProfile encodeProfileMix stream video encode profile. Default value is [ZegoEncodeProfileDefault].
encodeLatency
public int encodeLatencyThe video encoding delay of mixed stream output, Valid value range [0, 2000], in milliseconds. The default value is 0.
enableLowBitrateHD
public bool enableLowBitrateHDEnable high definition low bitrate. Default is false.
Methods
ZegoMixerOutputVideoConfig
ZegoMixerTask
Mix stream task object.
Details
This class is the configuration class of the stream mixing task. When a stream mixing task is requested to the ZEGO RTC server, the configuration of the stream mixing task is required. This class describes the detailed configuration information of this stream mixing task.
Declared in ZegoDefine.cs
Properties
taskID
public string taskIDMix stream task ID
audioConfig
videoConfig
inputList
outputList
watermark
backgroundColor
public int backgroundColorMix stream background color, The color value corresponding to RGBA is 0xRRGGBBAA, and setting the transparency of the background color is currently not supported. The AA in 0xRRGGBBAA is 00. For example, select RGB as #87CEFA as the background color, this parameter passes 0x87CEFA00.
backgroundImageURL
public string backgroundImageURLMix stream background image URL
enableSoundLevel
public bool enableSoundLevelEnable or disable sound level callback for the task. If enabled, then the remote player can get the soundLevel of every stream in the inputlist by [onMixerSoundLevelUpdate] callback.
streamAlignmentMode
public ZegoStreamAlignmentMode streamAlignmentModeThe stream mixing alignment mode
userData
public IntPtr userDataUser data, the length of user data should not be more than 1000 bytes,After setting, the streaming party can obtain the SEI content by listening to the callback of [onPlayerRecvSEI].
userDataLength
public uint userDataLengthUser data length, not greater than 1000. that only data with length will be read by SDK. If the length is greater than the actual length of data, the SDK will read the data according to the actual length of data.
advancedConfig
public Dictionary<string, string> advancedConfigSet advanced configuration, such as specifying video encoding and others. If you need to use it, contact ZEGO technical support.
minPlayStreamBufferLength
public int minPlayStreamBufferLengthSets the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server. In the real-time chorus KTV scenario, slight fluctuations in the network at the push end may cause the mixed stream to freeze. At this time, when the audience pulls the mixed stream, there is a high probability of the problem of freeze. By adjusting the lower limit of the interval range for the adaptive adjustment of the stream playing cache of the stream mixing server, it can optimize the freezing problem that occurs when playing mixing streams at the player end, but it will increase the delay. It is not set by default, that is, the server uses its own configuration values. It only takes effect for the new input stream setting, and does not take effect for the input stream that has already started mixing.Value Range: [0,10000], exceeding the maximum value will result in a failure of the stream mixing request. On web platforms, this property does not take effect.
mixImageCheckMode
public ZegoMixImageCheckMode mixImageCheckModeSet the mixed stream image check mode.
Methods
ZegoMixerTask
public void ZegoMixerTask(string taskID)ZegoDefine.csZegoMixerVideoConfig
Mix stream video config object.
Details
Configure video frame rate, bitrate, and resolution for mixer task
Declared in ZegoDefine.cs
Properties
width
public int widthVideo resolution width
height
public int heightVideo resolution height
fps
public int fpsVideo FPS, cannot be modified after starting a mixer task
bitrate
public int bitrateVideo bitrate in kbps
quality
public int qualityVideo quality, this value is valid when the video rate control mode parameter is set to constant quality. The valid value ranges from 0 to 51. The default value is 23. If you want better video quality, lower the quality value based on 23 to test the adjustment. If you want a smaller file size, test the adjustment by increasing the high quality value at the base of 23. Take the file size under the value x as an example. The file size under the value x + 6 is half the size of the file size under the value x, and the file size under the value x-6 is twice the size of the file size under the value x. On web platforms, this property does not take effect.
rateControlMode
public ZegoVideoRateControlMode rateControlModeVideo bitrate control mode. On web platforms, this property does not take effect.
Methods
ZegoMixerVideoConfig
ZegoMixerVideoConfig
public void ZegoMixerVideoConfig(int width, int height, int fps, int bitrate)ZegoDefine.csZegoNetWorkResourceCache
Media player network cache information
Declared in ZegoDefine.cs
Properties
time
public uint timeCached playable duration, unit ms
size
public uint sizeCached playable size, unit byte
ZegoNetworkTimeInfo
The NTP info
Declared in ZegoDefine.cs
Properties
timestamp
public ulong timestampNetwork timestamp after synchronization, 0 indicates not yet synchronized
maxDeviation
public int maxDeviationThe max deviation
ZegoPerformanceStatus
System performance monitoring status
Declared in ZegoDefine.cs
Properties
cpuUsageApp
public double cpuUsageAppCurrent CPU usage of the app, value range [0, 1]
cpuUsageSystem
public double cpuUsageSystemCurrent CPU usage of the system, value range [0, 1]
memoryUsageApp
public double memoryUsageAppCurrent memory usage of the app, value range [0, 1]
memoryUsageSystem
public double memoryUsageSystemCurrent memory usage of the system, value range [0, 1]
memoryUsedApp
public double memoryUsedAppCurrent memory used of the app, in MB
ZegoPlayStreamQuality
Played stream quality information.
Details
Audio and video parameters and network quality, etc.
Declared in ZegoDefine.cs
Properties
videoRecvFPS
public double videoRecvFPSVideo receiving frame rate. The unit of frame rate is f/s
videoDejitterFPS
public double videoDejitterFPSVideo dejitter frame rate. The unit of frame rate is f/s (Available since 1.17.0).WebGL does not have this information.
videoDecodeFPS
public double videoDecodeFPSVideo decoding frame rate. The unit of frame rate is f/s.WebGL does not have this information.
videoRenderFPS
public double videoRenderFPSVideo rendering frame rate. The unit of frame rate is f/s
videoKBPS
public double videoKBPSVideo bit rate in kbps
videoBreakRate
public double videoBreakRateVideo break rate, the unit is (number of breaks / every 10 seconds) (Available since 1.17.0).WebGL does not have this information.
audioRecvFPS
public double audioRecvFPSAudio receiving frame rate. The unit of frame rate is f/s
audioDejitterFPS
public double audioDejitterFPSAudio dejitter frame rate. The unit of frame rate is f/s (Available since 1.17.0).WebGL does not have this information.
audioDecodeFPS
public double audioDecodeFPSAudio decoding frame rate. The unit of frame rate is f/s.WebGL does not have this information.
audioRenderFPS
public double audioRenderFPSAudio rendering frame rate. The unit of frame rate is f/s
audioKBPS
public double audioKBPSAudio bit rate in kbps
audioBreakRate
public double audioBreakRateAudio break rate, the unit is (number of breaks / every 10 seconds) (Available since 1.17.0).WebGL does not have this information.
mos
public double mosThe audio quality of the playing stream determined by the audio MOS (Mean Opinion Score) measurement method, value range [-1, 5], where -1 means unknown, [0, 5] means valid score, the higher the score, the better the audio quality. For the subjective perception corresponding to the MOS value, please refer to https://docs.zegocloud.com/article/3720#4_4 (Available since 2.16.0).WebGL does not have this information.
rtt
public int rttServer to local delay, in milliseconds
packetLostRate
public double packetLostRatePacket loss rate, in percentage, 0.0 ~ 1.0
peerToPeerDelay
public int peerToPeerDelayDelay from peer to peer, in milliseconds
peerToPeerPacketLostRate
public double peerToPeerPacketLostRatePacket loss rate from peer to peer, in percentage, 0.0 ~ 1.0
level
delay
public int delayDelay after the data is received by the local end, in milliseconds
avTimestampDiff
public int avTimestampDiffThe difference between the video timestamp and the audio timestamp, used to reflect the synchronization of audio and video, in milliseconds. This value is less than 0 means the number of milliseconds that the video leads the audio, greater than 0 means the number of milliseconds that the video lags the audio, and 0 means no difference. When the absolute value is less than 200, it can basically be regarded as synchronized audio and video, when the absolute value is greater than 200 for 10 consecutive seconds, it can be regarded as abnormal (Available since 1.19.0).WebGL does not have this information.
isHardwareDecode
public bool isHardwareDecodeWhether to enable hardware decoding.WebGL does not have this information.
videoCodecID
public ZegoVideoCodecID videoCodecIDVideo codec ID (Available since 1.17.0).WebGL does not have this information.
totalRecvBytes
public double totalRecvBytesTotal number of bytes received, including audio, video, SEI.WebGL does not have this information.
audioRecvBytes
public double audioRecvBytesNumber of audio bytes received.WebGL does not have this information.
videoRecvBytes
public double videoRecvBytesNumber of video bytes received.WebGL does not have this information.
ZegoPlayerConfig
Advanced player configuration.
Details
Configure stream resource mode, CDN configuration and other advanced configurations.
Declared in ZegoDefine.cs
Properties
resourceMode
cdnConfig
public ZegoCDNConfig cdnConfigThe CDN configuration for playing stream. If set, the stream is play according to the URL instead of the streamID. After that, the streamID is only used as the ID of SDK internal callback.WebGL does not support Settings.
roomID
public string roomIDThe Room ID. It only needs to be filled in the multi-room mode, which indicates which room this stream needs to be bound to. This parameter is ignored in single room mode.
videoCodecID
public ZegoVideoCodecID videoCodecIDThe video encoding type of the stream, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
sourceResourceType
public ZegoResourceType sourceResourceTypeThe resource type of the source stream, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.WebGL does not support Settings.
codecTemplateID
public int codecTemplateIDPreconfigured codec template ID, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.WebGL does not support Settings.
resourceSwitchMode
public ZegoStreamResourceSwitchMode resourceSwitchModePlay resource switching strategy mode, the default is ZegoStreamResourceSwitchModeDefault.WebGL does not support Setting.
resourceWhenStopPublish
public ZegoStreamResourceType resourceWhenStopPublishPlay resource type when stop publish, the default is ZegoStreamResourceTypeDefault. This setting takes effect when the user sets [resourceSwitchMode] to ZegoStreamResourceSwitchModeDefault or ZegoStreamResourceSwitchModeSwitchToRTC.WebGL does not support Setting.
adaptiveSwitch
public int adaptiveSwitchWhether to enable adaptive switching of streams, 1 means on, 0 means off. Valid only if [resourceMode] is ZegoStreamResourceModeOnlyL3. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
adaptiveTemplateIDList
public List<int> adaptiveTemplateIDListStream adaptive transcoding template ID list, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
Methods
ZegoPlayerConfig
ZegoPublishStreamQuality
Published stream quality information.
Details
Audio and video parameters and network quality, etc.
Declared in ZegoDefine.cs
Properties
videoCaptureFPS
public double videoCaptureFPSVideo capture frame rate. The unit of frame rate is f/s
videoEncodeFPS
public double videoEncodeFPSVideo encoding frame rate. The unit of frame rate is f/s
videoSendFPS
public double videoSendFPSVideo transmission frame rate. The unit of frame rate is f/s
videoKBPS
public double videoKBPSVideo bit rate in kbps
audioCaptureFPS
public double audioCaptureFPSAudio capture frame rate. The unit of frame rate is f/s
audioSendFPS
public double audioSendFPSAudio transmission frame rate. The unit of frame rate is f/s
audioKBPS
public double audioKBPSAudio bit rate in kbps
rtt
public int rttLocal to server delay, in milliseconds
packetLostRate
public double packetLostRatePacket loss rate, in percentage, 0.0 ~ 1.0
level
isHardwareEncode
public bool isHardwareEncodeWhether to enable hardware encoding
videoCodecID
totalSendBytes
public double totalSendBytesTotal number of bytes sent, including audio, video, SEI
audioSendBytes
public double audioSendBytesNumber of audio bytes sent
videoSendBytes
public double videoSendBytesNumber of video bytes sent
ZegoPublisherConfig
Advanced publisher configuration.
Details
Configure room id
Declared in ZegoDefine.cs
Properties
roomID
public string roomIDThe Room ID, It is not necessary to pass in single room mode, but the ID of the corresponding room must be passed in multi-room mode
forceSynchronousNetworkTime
public int forceSynchronousNetworkTimeWhether to synchronize the network time when pushing streams. 1 is synchronized with 0 is not synchronized. And must be used with setStreamAlignmentProperty. It is used to align multiple streams at the mixed stream service or streaming end, such as the chorus scene of KTV.
streamCensorshipMode
public ZegoStreamCensorshipMode streamCensorshipModeWhen pushing a flow, review the pattern of the flow. By default, no audit is performed. If you want to use this function, contact ZEGO technical support.
streamCensorFlag
public int streamCensorFlagInspect flag. If you want to use this function, contact ZEGO technical support.
codecNegotiationType
public ZegoCapabilityNegotiationType codecNegotiationTypeCodec capability negotiation type. By default, no reference to the outcome of the capability negotiation. If you want to use this function, contact ZEGO technical support.
streamTitle
public string streamTitleStream title, a utf8 string with a maximum length of 255 bytes or less.
Methods
ZegoPublisherConfig
ZegoRect
View related coordinates.
Declared in ZegoDefine.cs
Properties
x
public int xThe horizontal offset from the top-left corner
y
public int yThe vertical offset from the top-left corner
width
public int widthThe width of the rectangle
height
public int heightThe height of the rectangle
Methods
ZegoRect
ZegoRect
ZegoReverbAdvancedParam
Audio reverberation advanced parameters.
Details
Developers can use the SDK's built-in presets to change the parameters of the reverb.
Declared in ZegoDefine.cs
Properties
roomSize
public float roomSizeRoom size(%), in the range [0.0, 1.0], to control the size of the "room" in which the reverb is generated, the larger the room, the stronger the reverb.
reverberance
public float reverberanceEcho(%), in the range [0.0, 100.0], to control the trailing length of the reverb.
damping
public float dampingReverb Damping(%), range [0.0, 100.0], controls the attenuation of the reverb, the higher the damping, the higher the attenuation.
wetOnly
public bool wetOnlyonly wet
wetGain
public float wetGainwet gain(dB), range [-20.0, 10.0]
dryGain
public float dryGaindry gain(dB), range [-20.0, 10.0]
toneLow
public float toneLowTone Low. 100% by default
toneHigh
public float toneHighTone High. 100% by default
preDelay
public float preDelayPreDelay(ms), range [0.0, 200.0]
stereoWidth
public float stereoWidthStereo Width(%). 0% by default
Methods
ZegoReverbAdvancedParam
ZegoReverbEchoParam
Audio reverberation echo parameters.
Declared in ZegoDefine.cs
Properties
inGain
public float inGainGain of input audio signal, in the range [0.0, 1.0]
outGain
public float outGainGain of output audio signal, in the range [0.0, 1.0]
numDelays
public int numDelaysNumber of echos, in the range [0, 7]
delay
public int[] delayRespective delay of echo signal, in milliseconds, in the range [0, 5000] ms
decay
public float[] decayRespective decay coefficient of echo signal, in the range [0.0, 1.0]
ZegoRoomConfig
Advanced room configuration.
Details
Configure maximum number of users in the room and authentication token, etc.
Declared in ZegoDefine.cs
Properties
maxMemberCount
public uint maxMemberCountThe maximum number of users in the room, Passing 0 means unlimited, the default is unlimited.
isUserStatusNotify
public bool isUserStatusNotifyWhether to enable the user in and out of the room callback notification [onRoomUserUpdate], the default is off. If developers need to use ZEGO Room user notifications, make sure that each user who login sets this flag to true
token
public string tokenThe token issued by the developer's business server is used to ensure security. For the generation rules, please refer to Using Token Authentication, the default is an empty string, that is, no authentication. In versions 2.17.0 and above, if appSign is not passed in when calling the [createEngine] API to create an engine, or if appSign is empty, this parameter must be set for authentication when logging in to a room.
capabilityNegotiationTypes
public uint capabilityNegotiationTypesThe bitmask marker for capability negotiation, refer to enum [ZegoRoomCapabilityNegotiationTypesBitMask], when this param converted to binary, 0b01 that means 1 << 0 for enable the capability negotiation of all user in the room, 0x10 that means 1 << 1 for enable the capability negotiation of publisher in the room. The masks can be combined to allow different types of capability negotiation.
Methods
ZegoRoomConfig
ZegoRoomExtraInfo
Room extra information.
Declared in ZegoDefine.cs
Properties
key
public string keyThe key of the room extra information.
value
public string valueThe value of the room extra information.
updateUser
public ZegoUser updateUserThe user who update the room extra information.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
updateTime
public ulong updateTimeUpdate time of the room extra information, UNIX timestamp, in milliseconds.
ZegoSEIConfig
SEI configuration
Details
Used to set the relevant configuration of the Supplemental Enhancement Information.
Declared in ZegoDefine.cs
Properties
type
ZegoSoundLevelConfig
Configuration for start sound level monitor.
Declared in ZegoDefine.cs
Properties
millisecond
public uint millisecondMonitoring time period of the sound level, in milliseconds, has a value range of [100, 3000]. Default is 100 ms.
enableVAD
public bool enableVADSet whether the sound level callback includes the VAD detection result.
ZegoSoundLevelInfo
Sound level info object.
Declared in ZegoDefine.cs
Properties
soundLevel
public float soundLevelSound level value.
vad
public int vadWhether the stream corresponding to StreamID contains voice, 0 means noise, 1 means normal voice. This value is valid only when the [enableVAD] parameter in the [ZegoSoundLevelConfig] configuration is set to true when calling [startSoundLevelMonitor].
ZegoStream
Stream object.
Details
Identify an stream object
Declared in ZegoDefine.cs
Properties
user
public ZegoUser userUser object instance.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
streamID
public string streamID- Caution: You cannot include URL keywords, otherwise publishing stream and playing stream will fails. Only support numbers, English characters and '-', '_'.
extraInfo
public string extraInfoStream extra info
ZegoStreamRelayCDNInfo
Relay to CDN info.
Details
Including the URL of the relaying CDN, relaying state, etc.
Declared in ZegoDefine.cs
Properties
url
public string urlURL of publishing stream to CDN
state
updateReason
stateTime
public ulong stateTimeThe timestamp when the state changed, UNIX timestamp, in milliseconds.
ZegoUser
User object.
Details
Configure user ID and username to identify users in the room. that the userID must be unique under the same appID, otherwise, there will be mutual kicks when logging in to the room. It is strongly recommended that userID corresponds to the user ID of the business APP, that is, a userID and a real user are fixed and unique, and should not be passed to the SDK in a random userID. Because the unique and fixed userID allows ZEGO technicians to quickly locate online problems.
Declared in ZegoDefine.cs
Properties
userID
public string userID- Privacy reminder: Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
- Caution: Only support numbers, English characters and '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', ''. Do not use '%' if you need to communicate with the Web SDK.
userName
public string userNameUser Name, a utf8 string with a maximum length of 256 bytes or less.Please do not fill in sensitive user information in this field, including but not limited to mobile phone number, ID number, passport number, real name, etc.
Methods
ZegoUser
ZegoUser
ZegoVideoConfig
Video config.
Details
Configure parameters used for publishing stream, such as bitrate, frame rate, and resolution. Developers should note that the width and height resolution of the mobile and desktop are opposite. For example, 360p, the resolution of the mobile is 360x640, and the desktop is 640x360. When using external capture, the capture and encoding resolution of RTC cannot be set to 0*0, otherwise, there will be no video data in the publishing stream in the entire engine life cycle.
Declared in ZegoDefine.cs
Properties
captureWidth
public int captureWidthCapture resolution width, control the width of camera image acquisition. SDK requires this member to be set to an even number. Only the camera is not started and the custom video capture is not used, the setting is effective. For performance reasons, the SDK scales the video frame to the encoding resolution after capturing from camera and before rendering to the preview view. Therefore, the resolution of the preview image is the encoding resolution. If you need the resolution of the preview image to be this value, Please call [setCapturePipelineScaleMode] first to change the capture pipeline scale mode to [Post].WebGL does not support Settings.
captureHeight
public int captureHeightCapture resolution height, control the height of camera image acquisition. SDK requires this member to be set to an even number. Only the camera is not started and the custom video capture is not used, the setting is effective. For performance reasons, the SDK scales the video frame to the encoding resolution after capturing from camera and before rendering to the preview view. Therefore, the resolution of the preview image is the encoding resolution. If you need the resolution of the preview image to be this value, Please call [setCapturePipelineScaleMode] first to change the capture pipeline scale mode to [Post].WebGL does not support Settings.
encodeWidth
public int encodeWidthEncode resolution width, control the image width of the encoder when publishing stream. SDK requires this member to be set to an even number. The settings before and after publishing stream can be effective
encodeHeight
public int encodeHeightEncode resolution height, control the image height of the encoder when publishing stream. SDK requires this member to be set to an even number. The settings before and after publishing stream can be effective
fps
public int fpsFrame rate, control the frame rate of the camera and the frame rate of the encoder. Publishing stream set to 60 fps, playing stream to take effect need contact technical support
bitrate
public int bitrateBit rate in kbps. The settings before and after publishing stream can be effective. The SDK will automatically set the bit rate suitable for the scenario selected by the developer. If the bit rate manually set by the developer exceeds the reasonable range, the SDK will automatically process the bit rate according to the reasonable range. If you need to configure a high bit rate due to business needs, please contact ZEGO Business.
codecID
public ZegoVideoCodecID codecIDThe codec id to be used, the default value is [default]. Settings only take effect before publishing stream
keyFrameInterval
public int keyFrameInterval- Required: No.
- Default value: 2 seconds.
- Value range: [2, 5].
- Caution: The setting is only valid before pushing.
Methods
ZegoVideoConfig
public void ZegoVideoConfig(ZegoVideoConfigPreset preset)ZegoDefine.csZegoVideoConfig
public void ZegoVideoConfig : this(ZegoVideoConfigPreset.Preset360P)ZegoDefine.cs360p, 15fps, 600kbps
ZegoVideoFrameParam
Object for video frame fieldeter.
Details
Including video frame format, width and height, etc.
Declared in ZegoDefine.cs
Properties
format
strides
public int[] stridesNumber of bytes per line (for example: BGRA only needs to consider strides [0], I420 needs to consider strides [0,1,2])
width
public int widthVideo frame width. When use custom video capture, the video data meeting the 32-bit alignment can obtain the maximum performance. Taking BGRA as an example, width * 4 is expected to be multiple of 32.
height
public int heightVideo frame height
rotation
public int rotationThe rotation direction of the video frame, the SDK rotates clockwise
ZegoVoiceChangerParam
Voice changer parameter.
Details
Developer can use the built-in presets of the SDK to change the parameters of the voice changer.
Declared in ZegoDefine.cs
Properties
pitch
public float pitchPitch parameter, value range [-12.0, 12.0], the larger the value, the sharper the sound, set it to 0.0 to turn off. that on v2.18.0 and older version, the value range is [-8.0, 8.0].
Methods
ZegoVoiceChangerParam
ZegoWatermark
Watermark object.
Details
Configure a watermark image URL and the layout of the watermark in the screen.
Declared in ZegoDefine.cs
Properties
imageURL
public string imageURLThe path of the watermark image. Support local file absolute path (file://xxx). The format supports png, jpg. The maximum length is less than 512 bytes.
