logo
On this page

Config

ZegoUIKitPrebuiltLiveStreamingConfig

Initialization related configuration class.

PropertyDescriptionType
roleDefines the role of the user in live streaming. The default value is .audience.ZegoLiveStreamingRole
turnOnCameraWhenJoiningWhether to turn on the camera when joining live streaming. The default value is false.Bool
turnOnMicrophoneWhenJoiningWhether to turn on the microphone when joining live streaming. The default value is false.Bool
useSpeakerWhenJoiningWhether to use the speaker when joining live streaming. The default value is true.Bool
audioVideoViewConfigConfiguration of audio and video views.ZegoPrebuiltAudioVideoViewConfig
bottomMenuBarConfigConfiguration parameters for the bottom menu bar of the live streaming page, such as the buttons in the bottom bar, the button quantity limit, whether to hide automatically, whether to hide when clicking other areas, and the color style.ZegoBottomMenuBarConfig
confirmDialogInfoConfiguration of the confirmation dialog displayed when leaving live streaming.ZegoLeaveConfirmDialogInfo
translationTextSupports switching the language environment of UIKit and modifying specific texts. The default value is ZegoTranslationText(language:.ENGLISH).ZegoTranslationText
enableCoHostingWhether to allow co-hosting. The default value is false.Bool
markAsLargeRoomWhether to mark the room as a large room (more than 500 people). If the number of participants in your live streaming will exceed 500, please set this flag to true. The default value is false.Bool
canCameraTurnOnByOthersWhether others can turn on your camera. The default value is false.Bool
canMicrophoneTurnOnByOthersWhether others can turn on your microphone. The default value is false.Bool
turnOnYourCameraConfirmDialogInfoWhen others want to turn on your camera, a confirmation dialog will be displayed in your app. You can set the content of this dialog.ZegoDialogInfo
turnOnYourMicrophoneConfirmDialogInfoWhen others want to turn on your microphone, a confirmation dialog will be displayed in your app. You can set the content of this dialog.ZegoDialogInfo
layoutConfigures the display layout of audio and video windows in the call page, including picture-in-picture layout and gallery layout.ZegoLayout
enableSignalingPluginWhether to use SignalingPlugin. If you need to use the co-hosting and PK functions, you need to set this value to true and import the ZegoUIKitSignalingPlugin library.Bool
videoConfigCustom configuration of video call resolution. The default is 360p.ZegoPrebuiltVideoConfig

ZegoPrebuiltAudioVideoViewConfig

View configuration class.

PropertyDescriptionType
useVideoViewAspectFillWhether to display the video in aspect fill mode (with black borders). Default is true.Bool
showSoundWavesInAudioModeWhether to display sound waves around the user's avatar when the host or co-host turns off the camera. Default is true.Bool

ZegoBottomMenuBarConfig

Class for managing the bottom menu bar buttons.

PropertyDescriptionType
maxCountThe maximum number of buttons in the menu bar. Default value is 5.Int
showInRoomMessageButtonWhether to show the in-room message button in the menu bar. Default value is true.Bool
hostButtonsThe list of bottom menu bar buttons visible to the host.[ZegoMenuBarButtonName]
coHostButtonsThe list of bottom menu bar buttons visible to the co-host.[ZegoMenuBarButtonName]
audienceButtonsThe list of bottom menu bar buttons visible to the audience.[ZegoMenuBarButtonName]

ZegoLayout

PropertyDescriptionType
modePage layout mode, supports picture-in-picture and gallery layout. The default is picture-in-picture layout.ZegoUIKitLayoutMode
configPage layout configuration.ZegoLayoutConfig

ZegoLayoutPictureInPictureConfig

Picture-in-picture layout configuration class.

PropertyDescriptionType
isSmallViewDraggableWhether the small view can be dragged. Default value is false.Bool
smallViewBackgroundColorBackground color of the small view. Default value is #333437.UIColor
largeViewBackgroundColorBackground color of the large view. Default value is #4A4B4D.UIColor
smallViewBackgroundImageBackground image of the small view. Default value is null.UIImage
largeViewBackgroundImageBackground image of the large view. Default value is null.UIImage
smallViewPositionPosition of the small view on the UI. Default value is .topRight.ZegoViewPosition
switchLargeOrSmallViewByClickWhether to switch between large and small views by clicking. Default value is true.Bool
smallViewSizeSize of the small view. Default value is CGSize(width: 95, height: 169).CGSize
spacingBetweenSmallViewsSpacing between small views. Default value is 0.CGFloat
removeViewWhenAudioVideoUnavailableWhether to remove the view when audio and video are unavailable. Default value is true.Bool

ZegoLayoutGalleryConfig

Gallery layout configuration class.

PropertyDescriptionType
addBorderRadiusAndSpacingBetweenViewWhether to add rounded corners and spacing between views. Default value is true.Bool
removeViewWhenAudioVideoUnavailableWhether to remove the view when audio and video are unavailable. Default value is false.Bool
showNewScreenSharingViewInFullscreenModeWhether to set fullscreen directly when entering screen sharing. Default value is true.Bool
showScreenSharingFullscreenModeToggleButtonRulesDisplay rules for the screen sharing fullscreen mode toggle button. Default value is true.Bool

ZegoLeaveConfirmDialogInfo

PropertyDescriptionType
titleThe title text.String
messageThe confirmation message text.String
cancelButtonNameThe text for the cancel button.String
confirmButtonNameThe text for the confirm button.String
dialogPresentVCThe view controller where the leave live streaming confirmation dialog is displayed. By default, it is displayed in the current live streaming.UIViewController

ZegoDialogInfo

Dialog information class.

PropertyDescriptionType
titleThe title text.String
messageThe confirmation message text.String
cancelButtonNameThe text for the cancel button.String
confirmButtonNameThe text for the confirm button.String
dialogPresentVCThe view controller where the leave live streaming confirmation dialog is displayed. By default, it is displayed in the current chat room.UIViewController

ZegoPrebuiltVideoConfig

Class for video resolution configuration.

PropertyDescription
resolutionZegoPresetResolution Resolution

ZegoShowFullscreenModeToggleButtonRules

Rules for displaying the toggle button in fullscreen mode.

EnumerationDescription
showWhenScreenPressedShow when the screen is pressed.
alwaysShowAlways show.
alwaysHideAlways hide.

ZegoLiveStreamingRole

Role enumeration

EnumerationDescription
hostHost.
coHostCo-host.
audienceAudience.

ZegoUIKitLayoutMode

Page layout modes enumeration.

EnumerationDescription
pictureInPicturePicture-in-picture layout.
galleryGallery layout.
invalidInvalid value.

ZegoMenuBarButtonName

Menu bar button names enumeration.

EnumerationDescription
leaveButtonButton to leave the live streaming.
toggleCameraButtonButton to toggle the camera on/off.
toggleMicrophoneButtonButton to toggle the microphone on/off.
switchCameraButtonButton to switch between front and rear camera.
swtichAudioOutputButtonButton to switch audio output device.
coHostControlButtonButton for audience to request co-hosting.
enableChatButtonButton for host to control whether to allow audience to co-host in the current live streaming.

ZegoUIKitLanguage

UI languages enumeration.

EnumerationDescription
ENGLISHUIKit displays in English.
CHSUIKit displays in Chinese.

ZegoViewPosition

View positions enumeration.

EnumerationDescription
topLeftTop left.
topRightTop right.
bottomLeftBottom left.
bottomRightBottom right.

Previous

Event