logo
On this page

Struct

ZegoAudioConfigZegoAudioEffectPlayConfig
ZegoAudioFrameParamZegoAudioSourceMixConfig
ZegoAutoMixerTaskZegoBackgroundConfig
ZegoBarrageMessageInfoZegoBroadcastMessageInfo
ZegoCDNConfigZegoCopyrightedMusicConfig
ZegoCopyrightedMusicGetLyricConfigZegoCopyrightedMusicGetSharedConfig
ZegoCopyrightedMusicGetSharedConfigV2ZegoCopyrightedMusicQueryCacheConfig
ZegoCopyrightedMusicQueryCacheConfigV2ZegoCopyrightedMusicRequestConfig
ZegoCopyrightedMusicRequestConfigV2ZegoCustomAudioConfig
ZegoCustomAudioProcessConfigZegoDataRecordConfig
ZegoDataRecordProgressZegoDeviceInfo
ZegoEngineConfigZegoEngineProfile
ZegoFontStyleZegoImageBuffer
ZegoLabelInfoZegoLayerBorderConfig
ZegoLogConfigZegoMediaPlayerMediaInfo
ZegoMixerAudioConfigZegoMixerImageInfo
ZegoMixerInputZegoMixerOutput
ZegoMixerOutputVideoConfigZegoMixerTask
ZegoMixerVideoConfigZegoMixerWhiteboard
ZegoNetworkSpeedTestConfigZegoNetworkSpeedTestQuality
ZegoNetworkTimeInfoZegoObjectSegmentationConfig
ZegoPerformanceStatusZegoPlayerConfig
ZegoPlayStreamQualityZegoPublisherConfig
ZegoPublishStreamQualityZegoRect
ZegoReverbAdvancedParamZegoReverbEchoParam
ZegoReverbParamZegoRoiRect
ZegoRoomConfigZegoRoomExtraInfo
ZegoScreenCaptureSourceInfoZegoSEIConfig
ZegoSoundLevelConfigZegoSoundLevelInfo
ZegoStreamZegoStreamRelayCDNInfo
ZegoUserZegoVideoConfig
ZegoVideoFrameObjectZegoView
ZegoVoiceChangerParamZegoWatermark

ZegoAudioConfig

Audio configuration.

Details

Configure audio bitrate, audio channel, audio encoding for publishing stream

Properties

bitrate

bitrate
bitrate: number

Audio bitrate in kbps, default is 48 kbps. The settings before and after publishing stream can be effective

channel

channel
channel: ZegoAudioChannel

Audio channel, default is Mono. The setting only take effect before publishing stream

codecID

codecID
codecID: ZegoAudioCodecID

codec ID, default is ZegoAudioCodecIDDefault. The setting only take effect before publishing stream

ZegoAudioEffectPlayConfig

AudioEffectPlayer play configuration.

Properties

playCount

playCount
playCount: number

The 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

isPublishOut
isPublishOut: boolean

Whether 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

Properties

sampleRate

sampleRate
sampleRate: ZegoAudioSampleRate

Sampling Rate

channel

channel
channel: ZegoAudioChannel

Audio channel, default is Mono

ZegoAudioSourceMixConfig

Audio source mix config

Details

Used to config whether mix media player, audio effect player and captured system audio into publish stream or not when set audio source.

Properties

mediaPlayerIndexList

mediaPlayerIndexList
mediaPlayerIndexList: Array<number>

Media player instance index list.

audioEffectPlayerIndexList

audioEffectPlayerIndexList
audioEffectPlayerIndexList: Array<number>

Audio effect player instance index list.

enableMixSystemPlayout

enableMixSystemPlayout
enableMixSystemPlayout: boolean

Enable or disable mix captured system audio into publish stream.

enableMixEnginePlayout

enableMixEnginePlayout
enableMixEnginePlayout: boolean

Enable or disable mix SDK playout into publish stream.

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.

Properties

taskID

taskID
taskID: string

Auto 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

roomID
roomID: string

Auto 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

audioConfig
audioConfig: ZegoMixerAudioConfig

The 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 is ZEGO_AUDIO_CHANNEL_MONO, the default encoding ID is ZEGO_AUDIO_CODEC_ID_DEFAULT, and the default multi-channel audio stream mixing mode is ZEGO_AUDIO_MIX_MODE_RAW.
  • Recommended value: Set this parameter based on requirements.

outputList

outputList
outputList: ZegoMixerOutput[]

The 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

enableSoundLevel
enableSoundLevel: boolean

Enable 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.

ZegoBackgroundConfig

Background config.

Details

It is used to configure background when the object segmentation is turned on.

Properties

processType

processType

Background process type.

color

color
color: number

Background color, the format is 0xRRGGBB, default is black, which is 0x000000

imageURL

imageURL
imageURL: string

Background image URL. Support local file absolute path (file://xxx). The format supports png, jpg.

videoURL

videoURL
videoURL: string
  • Caution: 1. The video will be played in a loop. 2. Support local file absolute path (file://xxx). 3. The format supports MP4, FLV, MKV, AVI. 4. The maximum resolution should not exceed 4096px, and it is recommended to be within 1920px. 5. The maximum video duration should not exceed 30 seconds, and it is recommended to be within 15 seconds. 6. The maximum video size should not exceed 50MB, and 10MB is recommended.

blurLevel

blurLevel

Background blur level.

ZegoBarrageMessageInfo

Barrage message info.

Details

The received object of the room barrage message, including the message content, message ID, sender, sending time

Properties

message

message
message: string

message content

messageID

messageID
messageID: string

message id

sendTime

sendTime
sendTime: number

Message send time, UNIX timestamp, in milliseconds.

fromUser

fromUser
fromUser: ZegoUser

Message 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.

ZegoBroadcastMessageInfo

Broadcast message info.

Details

The received object of the room broadcast message, including the message content, message ID, sender, sending time

Properties

message

message
message: string

message content

messageID

messageID
messageID: number

message id

sendTime

sendTime
sendTime: number

Message send time, UNIX timestamp, in milliseconds.

fromUser

fromUser
fromUser: ZegoUser

Message 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

Properties

url

url
url: string

CDN URL

authParam

authParam
authParam: string

Auth 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).

ZegoCopyrightedMusicConfig

CopyrightedMusic play configuration.

Properties

user

user
user: ZegoUser

User 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.

ZegoCopyrightedMusicGetLyricConfig

The configuration of getting lyric.

Properties

songID

songID
songID: string

the ID of the song.

vendorID

vendorID
vendorID: number

Copyright music resource song copyright provider.

ZegoCopyrightedMusicGetSharedConfig

The configuration of getting shared resource.

Properties

songID

songID
songID: string

the ID of the song.

vendorID

vendorID

Copyright music resource song copyright provider.

roomID

roomID
roomID: string

The room ID, the single-room mode can not be passed, and the corresponding room ID must be passed in the multi-room mode. Indicates which room to get resources from.

ZegoCopyrightedMusicGetSharedConfigV2

The configuration of getting shared resource.

Properties

songID

songID
songID: string

the ID of the song.

vendorID

vendorID
vendorID: number

Copyright music resource song copyright provider. Refer to the value of [ZegoCopyrightedMusicVendorID].

roomID

roomID
roomID: string

The room ID, the single-room mode can not be passed, and the corresponding room ID must be passed in the multi-room mode. Indicates which room to get resources from.

resourceType

resourceType
resourceType: number

The resource type of music.

ZegoCopyrightedMusicQueryCacheConfig

The configuration of querying cache.

Properties

songID

songID
songID: string

the ID of the song.

resourceType

resourceType

The resource type of music.

resourceQualityType

resourceQualityType

The resource quality type of music.

vendorID

vendorID

Copyright music resource song copyright provider.

ZegoCopyrightedMusicQueryCacheConfigV2

The configuration of querying cache.

Properties

songID

songID
songID: string

the ID of the song.

resourceType

resourceType
resourceType: number

The resource type of music. Refer to the value of [ZegoCopyrightedMusicResourceType].

resourceQualityType

resourceQualityType
resourceQualityType: number

The resource quality type of music. Refer to the value of [ZegoCopyrightedMusicResourceQualityType].

vendorID

vendorID
vendorID: number

Copyright music resource song copyright provider. Refer to the value of [ZegoCopyrightedMusicVendorID].

ZegoCopyrightedMusicRequestConfig

The configuration of requesting resource.

Properties

songID

songID
songID: string

the ID of the song.

mode

mode

VOD billing mode.

vendorID

vendorID

Copyright music resource song copyright provider.

roomID

roomID
roomID: string

The 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

masterID
masterID: string

The 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

sceneID
sceneID: number

The scene ID, indicate the actual business. For details, please consult ZEGO technical support.

ZegoCopyrightedMusicRequestConfigV2

The configuration of requesting resource.

Properties

songID

songID
songID: string

the ID of the song.

mode

mode
mode: number

VOD billing mode.

vendorID

vendorID
vendorID: number

Copyright music resource song copyright provider.

roomID

roomID
roomID: string

The 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

masterID
masterID: string

The 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

sceneID
sceneID: number

The scene ID, indicate the actual business. For details, please consult ZEGO technical support.

type

type
type: number

The resource type of music. Refer to the value of [ZegoCopyrightedMusicResourceType].

ZegoCustomAudioConfig

Custom audio configuration.

Properties

sourceType

sourceType
sourceType: ZegoAudioSourceType

Audio capture source type

ZegoCustomAudioProcessConfig

Customize the audio processing configuration object.

Details

Including custom audio acquisition type, sampling rate, channel number, sampling number and other parameters

Properties

sampleRate

sampleRate
sampleRate: ZegoAudioSampleRate

Sampling rate, the sampling rate of the input data expected by the audio pre-processing module in App. If 0, the default is the SDK internal sampling rate.

channel

channel
channel: ZegoAudioChannel

Number of sound channels, the expected number of sound channels for input data of the audio pre-processing module in App. If 0, the default is the number of internal channels in the SDK

samples

samples
samples: number

The number of samples required to encode a frame; if samples = 0, the SDK will use the internal sample number, and the SDK will pass the audio data to the external pre-processing module. If the samples! = 0 (the effective value of samples is between [160, 2048]), and the SDK will send audio data to the external preprocessing module that sets the length of sample number.

ZegoDataRecordConfig

Record config.

Properties

filePath

filePath
filePath: string

The 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

recordType
recordType: ZegoDataRecordType

Type of recording media

ZegoDataRecordProgress

File recording progress.

Properties

duration

duration
duration: number

Current recording duration in milliseconds

currentFileSize

currentFileSize
currentFileSize: number

Current recording file size in byte

quality

quality

The quality of current recording file

ZegoDeviceInfo

Device Info.

Details

Including device ID and name

Properties

deviceID

deviceID
deviceID: string

Device ID

deviceName

deviceName
deviceName: string

Device name

ZegoEngineConfig

Advanced engine configuration.

Properties

logConfig

logConfig
deprecated
logConfig: ?ZegoLogConfig

Log 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].

Deprecated
This property has been deprecated since version 2.3.0, please use the [setLogConfig] function instead.

advancedConfig

advancedConfig
advancedConfig: ?map<string, string>

Other 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

Properties

appID

appID
appID: number

Application 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

appSign
appSign: string

Application 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

scenario
scenario: ZegoScenario

The 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

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.

Properties

type

type
type: ZegoFontType
  • Required: False.
  • Default value: Source han sans [ZegoFontTypeSourceHanSans]

size

size
size: number
  • Required: False.
  • Default value: 24.
  • Value range: [12,100].

color

color
color: number
  • Required: False.
  • Default value: 16777215(white).
  • Value range: [0,16777215].

transparency

transparency
transparency: number
  • Required: False.
  • Default value: 0.
  • Value range: [0,100], 100 is completely opaque, 0 is completely transparent.

border

border
border: boolean
  • Required: False.
  • Default value: False.
  • Value range: True/False.

borderColor

borderColor
borderColor: number
  • Required: False.
  • Default value: 0.
  • Value range: [0,16777215].

ZegoImageBuffer

image data content

Properties

buffer

buffer
buffer: string

the base64 data of the image (example# h5.img.setAttribute('src', "data

/png;base64," + buffer)).

width

width
width: number

buffer width.

height

height
height: number

buffer height.

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.

Properties

text

text
text: string
  • Required: True.
  • Value range: Maximum support for displaying 100 Chinese characters and 300 English characters.

left

left
left: number
  • Required: False.
  • Default value: 0.

top

top
top: number
  • Required: False.
  • Default value: 0.

font

font
  • Required: False.

ZegoLayerBorderConfig

Layer border configuration.

Details

Customize the size, color, etc. of the layer border.

Properties

width

width
width: number

Border size, default value 4, the maximum value is 100.

color

color
color: number

Background color, the format is 0xRRGGBB, default is green, which is 0x00FF00

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.

Properties

logPath

logPath
logPath: string

Used 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

logSize
logSize: number

Used 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

logCount
logCount: number

Log files count. Default is 3. Value range is [3, 20].

ZegoMediaPlayerMediaInfo

Media Infomration of media file.

Details

Meida information such as video resolution of media file.

Properties

width

width
width: number

Video resolution width.

height

height
height: number

Video resolution height.

frameRate

frameRate
frameRate: number

Video frame rate.

ZegoMixerAudioConfig

Mix stream audio configuration.

Details

Configure video frame rate, bitrate, and resolution for mixer task

Properties

bitrate

bitrate
bitrate: number

Audio bitrate in kbps, default is 48 kbps, cannot be modified after starting a mixer task

channel

channel
channel: ZegoAudioChannel

Audio channel, default is Mono

codecID

codecID
codecID: ZegoAudioCodecID

codec ID, default is ZegoAudioCodecIDDefault

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.

Properties

url

url
url: string

The 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

displayMode
displayMode: number

Image 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.

ZegoMixerInput

Mixer input.

Details

Configure the mix stream input stream ID, type, and the layout

Properties

streamID

streamID
streamID: string
  • Caution: You cannot include URL keywords, otherwise publishing stream and playing stream will fails. Only support numbers, English characters and '-', '_'.

contentType

contentType

Mix stream content type

layout

layout
layout: ZegoRect

Stream 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

soundLevelID
soundLevelID: number

If enable soundLevel in mix stream task, an unique soundLevelID is need for every stream

volume

volume
volume: number

Input stream volume, valid range [0, 200], default is 100.

isAudioFocus

isAudioFocus
isAudioFocus: boolean

Whether the focus voice is enabled in the current input stream, the sound of this stream will be highlighted if enabled.

audioDirection

audioDirection
audioDirection: number

The 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

label
label: ZegoLabelInfo

Text watermark.

renderMode

renderMode
renderMode: ZegoMixRenderMode

Video view render mode.

imageInfo

imageInfo
imageInfo: ZegoMixerImageInfo

User image information.

cornerRadius

cornerRadius
cornerRadius: number

Video 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

advancedConfig
advancedConfig: ?map<string, string>

Set advanced configuration. Please contact ZEGO technical support. On web platforms, this property does not take effect.

ZegoMixerOutput

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

Properties

target

target
target: string

Mix 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

videoConfig

Mix stream output video config. On web platforms, this property does not take effect.

ZegoMixerOutputVideoConfig

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.

Properties

videoCodecID

videoCodecID
videoCodecID: ZegoVideoCodecID

Mix stream output video coding format, supporting H.264 and h.265 coding.

bitrate

bitrate
bitrate: number

Mix stream output video bitrate in kbps. The default value is the bitrate configured in [ZegoMixerVideoConfig].

encodeProfile

encodeProfile
encodeProfile: ZegoEncodeProfile

Mix stream video encode profile. Default value is [ZegoEncodeProfileDefault].

encodeLatency

encodeLatency
encodeLatency: number

The video encoding delay of mixed stream output, Valid value range [0, 2000], in milliseconds. The default value is 0.

enableLowBitrateHD

enableLowBitrateHD
enableLowBitrateHD: boolean

Enable high definition low bitrate. Default is false.

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.

Properties

taskID

taskID
taskID: string

The task ID of the task

inputList

inputList
inputList: ZegoMixerInput[]

The input list of the task

outputList

outputList
outputList: ZegoMixerOutput[]

The output list of the task

videoConfig

videoConfig
videoConfig: ZegoMixerVideoConfig

The video config of the task

audioConfig

audioConfig
audioConfig: ZegoMixerAudioConfig

The audio config of the task

watermark

watermark
watermark: ?ZegoWatermark

The watermark of the task

whiteboard

whiteboard
whiteboard: ?ZegoMixerWhiteboard

Mix stream whiteboard

backgroundImageURL

backgroundImageURL
backgroundImageURL: string

The background image URL of the task

enableSoundLevel

enableSoundLevel
enableSoundLevel: boolean

Enable 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

streamAlignmentMode
streamAlignmentMode: ZegoStreamAlignmentMode

The stream mixing alignment mode

userData

userData
userData: ArrayBuffer

User data, the length of user data should not be more than 1000 bytes and must be utf8 encoded. After setting, the streaming party can obtain the SEI content by listening to the callback of [onPlayerRecvSEI]. Must be encoded for utf8.

advancedConfig

advancedConfig
advancedConfig: ?map<string, string>

Set advanced configuration, such as specifying video encoding and others. If you need to use it, contact ZEGO technical support.

minPlayStreamBufferLength

minPlayStreamBufferLength
minPlayStreamBufferLength: number

Sets 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.

ZegoMixerVideoConfig

Mix stream video config object.

Details

Configure video frame rate, bitrate, and resolution for mixer task

Properties

width

width
width: number

Video resolution width

height

height
height: number

Video resolution height

fps

fps
fps: number

Video FPS, cannot be modified after starting a mixer task

bitrate

bitrate
bitrate: number

Video bitrate in kbps

quality

quality
quality: number

Video 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

rateControlMode
rateControlMode: ZegoVideoRateControlMode

Video bitrate control mode. On web platforms, this property does not take effect.

ZegoMixerWhiteboard

Mixer whiteboard object.

Details

Configure the mix whiteboard ID, aspect ratio and the layout.

Properties

whiteboardID

whiteboardID
whiteboardID: number

Whiteboard ID.

horizontalRatio

horizontalRatio
horizontalRatio: number

Whiteboard aspect ratio(width), the default aspect ratio is 16:9.

verticalRatio

verticalRatio
verticalRatio: number

Whiteboard aspect ratio(height), the default aspect ratio is 16:9.

isPPTAnimation

isPPTAnimation
isPPTAnimation: boolean

Whether the whiteboard will load dynamic PPT files or not, default value is false.

layout

layout
layout: ZegoRect

Whiteboard layout.

zOrder

zOrder
zOrder: number

Whiteboard z-order.

backgroundColor

backgroundColor
backgroundColor: number

Whiteboard background color. Defaule is 0xF1F3F400 (gray). 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.F

ZegoNetworkSpeedTestConfig

Network speed test config

Properties

testUplink
testUplink: boolean

Test uplink or not

expectedUplinkBitrate

expectedUplinkBitrate
expectedUplinkBitrate: number

The unit is kbps. Recommended to use the bitrate in ZegoVideoConfig when call startPublishingStream to determine whether the network uplink environment is suitable.

testDownlink
testDownlink: boolean

Test downlink or not

expectedDownlinkBitrate

expectedDownlinkBitrate
expectedDownlinkBitrate: number

The unit is kbps. Recommended to use the bitrate in ZegoVideoConfig when call startPublishingStream to determine whether the network downlink environment is suitable.

ZegoNetworkSpeedTestQuality

network speed test quality

Properties

connectCost

connectCost
connectCost: number

Time to connect to the server, in milliseconds. During the speed test, if the network connection is disconnected, it will automatically initiate a reconnection, and this variable will be updated accordingly.

rtt

rtt
rtt: number

rtt, in milliseconds

packetLostRate

packetLostRate
packetLostRate: number

packet lost rate. in percentage, 0.0 ~ 1.0

quality

quality

network quality. excellent, good, medium and poor

ZegoNetworkTimeInfo

The NTP info

Properties

timestamp

timestamp
timestamp: number

Network timestamp after synchronization, 0 indicates not yet synchronized

maxDeviation

maxDeviation
maxDeviation: number

The max deviation

ZegoObjectSegmentationConfig

Object segmentation config.

Details

It is used to configure parameters when the object segmentation is turned on.

Properties

objectSegmentationType

objectSegmentationType
objectSegmentationType: ZegoObjectSegmentationType

The type of object segmentation.

backgroundConfig

backgroundConfig
backgroundConfig: ZegoBackgroundConfig

Background config.

ZegoPerformanceStatus

System performance monitoring status

Properties

cpuUsageApp

cpuUsageApp
cpuUsageApp: number

Current CPU usage of the app, value range [0, 1]

cpuUsageSystem

cpuUsageSystem
cpuUsageSystem: number

Current CPU usage of the system, value range [0, 1]

memoryUsageApp

memoryUsageApp
memoryUsageApp: number

Current memory usage of the app, value range [0, 1]

memoryUsageSystem

memoryUsageSystem
memoryUsageSystem: number

Current memory usage of the system, value range [0, 1]

memoryUsedApp

memoryUsedApp
memoryUsedApp: number

Current memory used of the app, in MB

ZegoPlayStreamQuality

Played stream quality information.

Details

Audio and video parameters and network quality, etc.

Properties

videoRecvFPS

videoRecvFPS
videoRecvFPS: number

Video receiving frame rate. The unit of frame rate is f/s

videoDejitterFPS

videoDejitterFPS
videoDejitterFPS: number

Video dejitter frame rate. The unit of frame rate is f/s (Available since 1.17.0)

videoDecodeFPS

videoDecodeFPS
videoDecodeFPS: number

Video decoding frame rate. The unit of frame rate is f/s

videoRenderFPS

videoRenderFPS
videoRenderFPS: number

Video rendering frame rate. The unit of frame rate is f/s

videoKBPS

videoKBPS
videoKBPS: number

Video bit rate in kbps

videoBreakRate

videoBreakRate
videoBreakRate: number

Video break count, break count during the callback cycle (Available since 1.17.0)

audioRecvFPS

audioRecvFPS
audioRecvFPS: number

Audio receiving frame rate. The unit of frame rate is f/s

audioDejitterFPS

audioDejitterFPS
audioDejitterFPS: number

Audio dejitter frame rate. The unit of frame rate is f/s (Available since 1.17.0)

audioDecodeFPS

audioDecodeFPS
audioDecodeFPS: number

Audio decoding frame rate. The unit of frame rate is f/s

audioRenderFPS

audioRenderFPS
audioRenderFPS: number

Audio rendering frame rate. The unit of frame rate is f/s

audioKBPS

audioKBPS
audioKBPS: number

Audio bit rate in kbps

audioBreakRate

audioBreakRate
audioBreakRate: number

Audio break count, break count during the callback cycle (Available since 1.17.0)

mos

mos
mos: number

The 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)

rtt

rtt
rtt: number

Server to local delay, in milliseconds

packetLostRate

packetLostRate
packetLostRate: number

Packet loss rate, in percentage, 0.0 ~ 1.0

peerToPeerDelay

peerToPeerDelay
peerToPeerDelay: number

Delay from peer to peer, in milliseconds

peerToPeerPacketLostRate

peerToPeerPacketLostRate
peerToPeerPacketLostRate: number

Packet loss rate from peer to peer, in percentage, 0.0 ~ 1.0

level

level

Published stream quality level

delay

delay
delay: number

Delay after the data is received by the local end, in milliseconds

avTimestampDiff

avTimestampDiff
avTimestampDiff: number

The 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)

isHardwareDecode

isHardwareDecode
isHardwareDecode: boolean

Whether to enable hardware decoding

videoCodecID

videoCodecID
videoCodecID: ZegoVideoCodecID

Video codec ID (Available since 1.17.0)

totalRecvBytes

totalRecvBytes
totalRecvBytes: number

Total number of bytes received, including audio, video, SEI

audioRecvBytes

audioRecvBytes
audioRecvBytes: number

Number of audio bytes received

videoRecvBytes

videoRecvBytes
videoRecvBytes: number

Number of video bytes received

audioCumulativeBreakCount

audioCumulativeBreakCount
audioCumulativeBreakCount: number

Accumulated audio break count (Available since 2.9.0)

audioCumulativeBreakTime

audioCumulativeBreakTime
audioCumulativeBreakTime: number

Accumulated audio break time, in milliseconds (Available since 2.9.0)

audioCumulativeBreakRate

audioCumulativeBreakRate
audioCumulativeBreakRate: number

Accumulated audio break rate, in percentage, 0.0 ~ 100.0 (Available since 2.9.0)

audioCumulativeDecodeTime

audioCumulativeDecodeTime
audioCumulativeDecodeTime: number

Accumulated audio decode time, in milliseconds (Available since 2.9.0)

videoCumulativeBreakCount

videoCumulativeBreakCount
videoCumulativeBreakCount: number

Accumulated video break count (Available since 2.9.0)

videoCumulativeBreakTime

videoCumulativeBreakTime
videoCumulativeBreakTime: number

Accumulated video break time, in milliseconds (Available since 2.9.0)

videoCumulativeBreakRate

videoCumulativeBreakRate
videoCumulativeBreakRate: number

Accumulated video break rate, in percentage, 0.0 ~ 1.0 (Available since 2.9.0)

videoCumulativeDecodeTime

videoCumulativeDecodeTime
videoCumulativeDecodeTime: number

Accumulated video decode time, in milliseconds (Available since 2.9.0)

muteVideo

muteVideo
muteVideo: number

Mute video (Available since 3.13.0)

muteAudio

muteAudio
muteAudio: number

Mute audio (Available since 3.13.0)

ZegoPlayerConfig

Advanced player configuration.

Details

Configure stream resource mode, CDN configuration and other advanced configurations.

Properties

resourceMode

resourceMode
resourceMode: ZegoStreamResourceMode

Stream resource mode.

cdnConfig

cdnConfig
cdnConfig: ?ZegoCDNConfig

The 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.

roomID

roomID
roomID: string

The 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

videoCodecID
videoCodecID: ZegoVideoCodecID

The video encoding type of the stream, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.

sourceResourceType

sourceResourceType
sourceResourceType: ZegoResourceType

The resource type of the source stream, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.

codecTemplateID

codecTemplateID
codecTemplateID: number

Preconfigured codec template ID, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.

resourceSwitchMode

resourceSwitchMode
resourceSwitchMode: ZegoStreamResourceSwitchMode

Play resource switching strategy mode, the default is ZegoStreamResourceSwitchModeDefault

resourceWhenStopPublish

resourceWhenStopPublish
resourceWhenStopPublish: ZegoStreamResourceType

Play resource type when stop publish, the default is ZegoStreamResourceTypeDefault. This setting takes effect only if the user sets [resourceMode] to ZegoStreamResourceModeDefaut and [resourceSwitchMode] to ZegoStreamResourceSwitchModeDefault or ZegoStreamResourceSwitchModeSwitchToRTC.

ZegoPublishStreamQuality

Published stream quality information.

Details

Audio and video parameters and network quality, etc.

Properties

videoCaptureFPS

videoCaptureFPS
videoCaptureFPS: number

Video capture frame rate. The unit of frame rate is f/s

videoEncodeFPS

videoEncodeFPS
videoEncodeFPS: number

Video encoding frame rate. The unit of frame rate is f/s

videoSendFPS

videoSendFPS
videoSendFPS: number

Video transmission frame rate. The unit of frame rate is f/s

videoKBPS

videoKBPS
videoKBPS: number

Video bit rate in kbps

audioCaptureFPS

audioCaptureFPS
audioCaptureFPS: number

Audio capture frame rate. The unit of frame rate is f/s

audioSendFPS

audioSendFPS
audioSendFPS: number

Audio transmission frame rate. The unit of frame rate is f/s

audioKBPS

audioKBPS
audioKBPS: number

Audio bit rate in kbps

rtt

rtt
rtt: number

Local to server delay, in milliseconds

packetLostRate

packetLostRate
packetLostRate: number

Packet loss rate, in percentage, 0.0 ~ 1.0

level

level

Published stream quality level

isHardwareEncode

isHardwareEncode
isHardwareEncode: boolean

Whether to enable hardware encoding

videoCodecID

videoCodecID
videoCodecID: ZegoVideoCodecID

Video codec ID (Available since 1.17.0)

totalSendBytes

totalSendBytes
totalSendBytes: number

Total number of bytes sent, including audio, video, SEI

audioSendBytes

audioSendBytes
audioSendBytes: number

Number of audio bytes sent

videoSendBytes

videoSendBytes
videoSendBytes: number

Number of video bytes sent

ZegoPublisherConfig

Advanced publisher configuration.

Details

Configure room id

Properties

roomID

roomID
roomID: string

The 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

forceSynchronousNetworkTime
forceSynchronousNetworkTime: number

Whether 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

streamCensorshipMode
streamCensorshipMode: ZegoStreamCensorshipMode

When 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

streamCensorFlag
streamCensorFlag: number

Inspect flag. If you want to use this function, contact ZEGO technical support.

ZegoRect

View related coordinates.

Properties

x

x
x: number

The horizontal offset from the top-left corner

y

y
y: number

The vertical offset from the top-left corner

width

width
width: number

The width of the rectangle

height

height
height: number

The height of the rectangle

ZegoReverbAdvancedParam

Audio reverberation advanced parameters.

Details

Developers can use the SDK's built-in presets to change the parameters of the reverb.

Properties

roomSize

roomSize
roomSize: number

Room 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

reverberance
reverberance: number

Echo(%), in the range [0.0, 100.0], to control the trailing length of the reverb.

damping

damping
damping: number

Reverb Damping(%), range [0.0, 100.0], controls the attenuation of the reverb, the higher the damping, the higher the attenuation.

wetOnly

wetOnly
wetOnly: boolean

only wet

wetGain

wetGain
wetGain: number

wet gain(dB), range [-20.0, 10.0]

dryGain

dryGain
dryGain: number

dry gain(dB), range [-20.0, 10.0]

toneLow

toneLow
toneLow: number

Tone Low. 100% by default

toneHigh

toneHigh
toneHigh: number

Tone High. 100% by default

preDelay

preDelay
preDelay: number

PreDelay(ms), range [0.0, 200.0]

stereoWidth

stereoWidth
stereoWidth: number

Stereo Width(%). 0% by default

ZegoReverbEchoParam

Audio reverberation echo parameters.

Properties

inGain

inGain
inGain: number

Gain of input audio signal, in the range [0.0, 1.0]

outGain

outGain
outGain: number

Gain of output audio signal, in the range [0.0, 1.0]

numDelays

numDelays
numDelays: number

Number of echos, in the range [0, 7]

delay

delay
delay: number[]

Respective delay of echo signal, in milliseconds, in the range [0, 5000] ms

decay

decay
decay: number[]

Respective decay coefficient of echo signal, in the range [0.0, 1.0]

ZegoReverbParam

Audio reverberation parameters.

Details

Developers can use the SDK's built-in presets to change the parameters of the reverb.

Properties

roomSize

roomSize
roomSize: number

Room 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

reverberance
reverberance: number

Echo, in the range [0.0, 0.5], to control the trailing length of the reverb.

damping

damping
damping: number

Reverb Damping, range [0.0, 2.0], controls the attenuation of the reverb, the higher the damping, the higher the attenuation.

dryWetRatio

dryWetRatio
dryWetRatio: number

Dry/wet ratio, the range is greater than or equal to 0.0, to control the ratio between reverberation, direct sound and early reflections; dry part is set to 1 by default; the smaller the dry/wet ratio, the larger the wet ratio, the stronger the reverberation effect.

ZegoRoiRect

Coordinates used by the ROI function.

Properties

x

x
x: number

The horizontal offset from the top-left corner

y

y
y: number

The vertical offset from the top-left corner

width

width
width: number

The width of the rectangle

height

height
height: number

The height of the rectangle

strength

strength
strength: number

ROI strength, currently supported value range is [0, 4], 0 is no effect, 4 is the strongest.

ZegoRoomConfig

Advanced room configuration.

Details

Configure maximum number of users in the room and authentication token, etc.

Properties

maxMemberCount

maxMemberCount
maxMemberCount: number

The maximum number of users in the room, Passing 0 means unlimited, the default is unlimited.

isUserStatusNotify

isUserStatusNotify
isUserStatusNotify: boolean

Whether 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

token
token: string

The 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.

ZegoRoomExtraInfo

Room extra information.

Properties

key

key
key: string

The key of the room extra information.

value

value
value: string

The value of the room extra information.

updateUser

updateUser
updateUser: ZegoUser

The 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

updateTime
updateTime: number

Update 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.

Properties

type

type
type: ZegoSEIType

SEI type

ZegoScreenCaptureSourceInfo

The screen captures source information.

Properties

sourceType

sourceType

Target type for screen capture. (only for desktop)

sourceID

sourceID
sourceID: number

The ID of the capture source.

sourceName

sourceName
sourceName: string

Capture source name (in UTF8 encoding).

thumbnailImage

thumbnailImage
thumbnailImage: ZegoImageBuffer

Thumbnail of the capture window.

iconImage

iconImage
iconImage: ZegoImageBuffer

The image content of the icon.

ZegoSoundLevelConfig

Configuration for start sound level monitor.

Properties

millisecond

millisecond
millisecond: number

Monitoring time period of the sound level, in milliseconds, has a value range of [100, 3000]. Default is 100 ms.

enableVAD

enableVAD
enableVAD: boolean

Set whether the sound level callback includes the VAD detection result.

ZegoSoundLevelInfo

Sound level info object.

Properties

streamID

streamID
streamID: string

Stream ID.

soundLevel

soundLevel
soundLevel: number

Sound level value.

vad

vad
vad: number

Whether 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 [startSoundLevelMonitorWithConfig].

ZegoStream

Stream object.

Details

Identify an stream object

Properties

user

user
user: ZegoUser

User 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

streamID
streamID: string
  • Caution: You cannot include URL keywords, otherwise publishing stream and playing stream will fails. Only support numbers, English characters and '-', '_'.

extraInfo

extraInfo
extraInfo: string

Stream extra info

ZegoStreamRelayCDNInfo

Relay to CDN info.

Details

Including the URL of the relaying CDN, relaying state, etc.

Properties

url

url
url: string

URL of publishing stream to CDN

state

state

State of relaying to CDN

updateReason

updateReason

Reason for relay state changed

stateTime

stateTime
stateTime: number

The 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.

Properties

userID

userID
userID: string
  • 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

userName
userName: string

User 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.

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.

Properties

captureWidth

captureWidth
captureWidth: number

Capture 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]

captureHeight

captureHeight
captureHeight: number

Capture 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]

encodeWidth

encodeWidth
encodeWidth: number

Encode 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

encodeHeight
encodeHeight: number

Encode 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

fps
fps: number

Frame 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

bitrate
bitrate: number

Bit 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

codecID
codecID: ZegoVideoCodecID

The codec id to be used, the default value is [default]. Settings only take effect before publishing stream

keyFrameInterval

keyFrameInterval
keyFrameInterval: number
  • Required: No.
  • Default value: 2 seconds.
  • Value range: [2, 5].
  • Caution: The setting is only valid before pushing.

ZegoVideoFrameObject

Object for video frame.

Details

Including video frame data, width and height, etc.

Properties

width

width
width: number

video width

height

height
height: number

video height

data

data
data: Uint8Array

video data(rgba)

channel

channel

publish channel, only used for preview or publish

streamID

streamID
streamID: string

stream ID, only used for playing stream

ZegoView

View object.

Details

Configure view object, view Mode, background color

Properties

viewMode

viewMode
viewMode: ZegoViewMode

View mode, default is ZegoViewModeAspectFit

backgroundColor

backgroundColor
backgroundColor: number

Background color, the format is 0xRRGGBB, default is black, which is 0x000000

canvas

canvas
canvas: canvas

html canvas element

preserveDrawingBuffer

preserveDrawingBuffer
preserveDrawingBuffer: boolean

webgl context preserve drawing buffer

ZegoVoiceChangerParam

Voice changer parameter.

Details

Developer can use the built-in presets of the SDK to change the parameters of the voice changer.

Properties

pitch

pitch
pitch: number

Pitch 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].

ZegoWatermark

Watermark object.

Details

Configure a watermark image URL and the layout of the watermark in the screen.

Properties

imageURL

imageURL
imageURL: string

The 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.

layout

layout
layout: ZegoRect

Watermark image layout

Previous

Class

Next

Enum

On this page

Back to top