logo
Video Call
On this page

Struct

ZegoAudioConfigZegoAudioFrameParam
ZegoCanvasZegoCDNConfig
ZegoDeviceInfoZegoEffectsBeautyParam
ZegoEngineConfigZegoEngineProfile
ZegoLogConfigZegoMediaPlayerResource
ZegoNetworkSpeedTestConfigZegoNetworkSpeedTestQuality
ZegoPerformanceStatusZegoPlayerConfig
ZegoPlayStreamQualityZegoPublisherConfig
ZegoPublishStreamQualityZegoRect
ZegoReverbAdvancedParamZegoReverbEchoParam
ZegoRoiRectZegoRoomConfig
ZegoRoomExtraInfoZegoScreenCaptureConfig
ZegoSoundLevelConfigZegoSoundLevelInfo
ZegoStreamZegoStreamRelayCDNInfo
ZegoUserZegoVideoConfig
ZegoVoiceChangerParam

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

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

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

protocol

protocol
protocol: string

URL 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

quicVersion
quicVersion: string

QUIC 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

httpdns
httpdns: ZegoHttpDNSType

customized httpdns service. This feature is only supported for playing stream currently.

quicConnectMode

quicConnectMode
quicConnectMode: number

QUIC 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

customParams
customParams: string

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

ZegoCanvas

View object.

Details

Configure view object, view Mode, background color

Properties

view

view
view: Sprite

View object

viewMode

viewMode
viewMode: ZegoViewMode

View mode, default is ZegoViewModeAspectFit

ZegoDeviceInfo

Device Info.

Details

Including device ID and name

Properties

deviceID

deviceID
deviceID: string

Device ID

deviceName

deviceName
deviceName: string

Device name

ZegoEffectsBeautyParam

Beauty configuration param.

Details

Configure the whiten, rosy, smooth, and sharpen parameters for beauty.

Properties

whitenIntensity

whitenIntensity
whitenIntensity: number

The whiten intensity parameter, the value range is [0,100], and the default is 50.

rosyIntensity

rosyIntensity
rosyIntensity: number

the rosy intensity parameter, value range [0,100], and the default is 50.

smoothIntensity

smoothIntensity
smoothIntensity: number

the smooth intensity parameter, value range [0,100], and the default is 50.

sharpenIntensity

sharpenIntensity
sharpenIntensity: number

the sharpen intensity parameter, value range [0,100], and the default is 50.

ZegoEngineConfig

Advanced engine configuration.

Properties

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

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

ZegoMediaPlayerResource

Multimedia resource for ZEGO media player.

Details

Used to configure loading parameters when loading multimedia resources.

Properties

loadType

loadType

Used to specify the loading type of multimedia resources.

startPosition

startPosition
startPosition: number

The progress at which the plaback started.

filePath

filePath
filePath: string

Common resource path.The absolute resource path or the URL of the network resource and cannot be nil or "". Android can set this path string with Uri.

resourceID

resourceID
resourceID: string

The resource ID obtained from the copyrighted music module.

onlineResourceCachePath

onlineResourceCachePath
onlineResourceCachePath: string

Online resource cache path, in utf8 encoding format.

maxCachePendingLength

maxCachePendingLength
maxCachePendingLength: number

The maximum length of online resource cache to be used, in bytes, with a minimum setting of 500K (500 * 1024). The default value is 0 - no limit, and try to cache the entire file.

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

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]

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.

ZegoScreenCaptureConfig

Screen capture configuration parameters.

Properties

captureVideo

captureVideo
captureVideo: boolean

Whether to capture video when screen capture. The default is true.

captureAudio

captureAudio
captureAudio: boolean

Whether to capture audio when screen capture. The default is true.

microphoneVolume

microphoneVolume
microphoneVolume: number

Set Microphone audio volume for ReplayKit. The range is 0 ~ 200. The default is 100. (only for iOS)

applicationVolume

applicationVolume
applicationVolume: number

Set Application audio volume for ReplayKit. The range is 0 ~ 200. The default is 100. (only for iOS and Android)

audioParam

audioParam
audioParam: ZegoAudioFrameParam

Set the audio capture parameters during screen capture. (only for Android)

cropRect

cropRect
cropRect: ZegoRect

Set the crop rectangle during screen capture. The crop rectangle must be included in the rectangle of the original data, unit is pixel. (only for iOS/Android)

orientation

orientation
orientation: ZegoScreenCaptureOrientation

Set the capture orientation of the screen capture. The capture orientation will be fixed, ignoring the system returned orientation. (only for iOS/Android)

muteExtensMicrophone

muteExtensMicrophone
muteExtensMicrophone: boolean

Set whether to mute the microphone of the extension process. The default is false. (only for iOS)

audioDeviceMode

audioDeviceMode
audioDeviceMode: ZegoScreenCaptureAudioDeviceMode

Set the audio device mode for the specified scene, the default is None. (only for iOS) s:

  1. Only works when the audio main source is always a microphone;
  2. Only works for [startScreenCapture] interface, [updateScreenCapture] does not take effect;
  3. The audio device mode changes during screen capture may cause the audio output of the screen capture to be abnormal, which can be monitored through [onMobileScreenCaptureExceptionOccurred] callback, and if necessary, the screen capture needs to be restarted.;
  4. After the screen capture is stopped, the audio device mode before the screen capture will be restored.

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

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 [startSoundLevelMonitor].

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.

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

Previous

Class

Next

Enum