logo
On this page

Config

ZegoUIKitPrebuiltLiveStreamingConfig

Configuration class for live streaming initialization.

PropertyDescriptionType
roleDefines the role of the user in the live streaming. The default value is ZegoLiveStreamingRole.AUDIENCE.ZegoLiveStreamingRole
turnOnCameraWhenJoiningWhether to automatically turn on the camera when joining the live streaming. The default value is false.boolean
turnOnMicrophoneWhenJoiningWhether to automatically turn on the microphone when joining the live streaming. The default value is false.boolean
turnOnCameraWhenCohostedWhether to automatically turn on the camera when co-hosting. The default value is true.boolean
useSpeakerWhenJoiningWhether to use the speaker when joining the live streaming. The default value is true.boolean
audioVideoViewConfigConfiguration for audio and video views. Please refer to Hide components and Add custom UI components.ZegoPrebuiltAudioVideoViewConfig
bottomMenuBarConfigConfiguration for the bottom menu bar. Please refer to Customize the menu bar.ZegoBottomMenuBarConfig
memberListConfigConfiguration for the member list.ZegoMemberListConfig
confirmDialogInfoIf confirmDialogInfo is not empty, a confirmation dialog will be displayed when the host stops the live streaming, clicks the exit button, or presses the back button. The properties in ZegoDialogInfo are deprecated. Please use ZegoTranslationText .stopLiveDialogInfo to modify the dialog text.ZegoDialogInfo
zegoLiveStreamingEndListenerListener for the end of the live streaming. When the host closes the live streaming, the audience will receive this callback. Please refer to the Event documentation.ZegoLiveStreamingEndListener
leaveLiveStreamingListenerListener for leaving the live streaming. Clicking the back button on the live preview page or the exit button on the live page will trigger this callback. The default behavior is to exit and close the live page. If you customize this interface, the default behavior will not be executed, and you need to close the live page actively. Please refer to the Event documentation.ZegoLeaveLiveStreamingListener
removedFromRoomListenerListener for being removed from the room. This callback will be triggered if you are logged out or kicked out of the room. The default behavior is to exit the live streaming and close the live page. If you customize this interface, the default behavior will not be executed, and you need to close the live page actively. Please refer to the Event documentation.ZegoMeRemovedFromRoomListener
translationTextPlease refer to Modify User Interface text.ZegoTranslationText
enableCoHostingWhether to enable co-hosting.boolean
markAsLargeRoomWhether to mark the room as a large room (more than 500 people). If the number of participants in your live streaming exceeds 500, set this flag to true. The default value is false.boolean
needConfirmWhenOthersTurnOnYourCameraWhether to require confirmation when others turn on your camera. The default value is true.boolean
needConfirmWhenOthersTurnOnYourMicrophoneWhether to require confirmation when others turn on your microphone. The default value is true.boolean
othersTurnOnYourCameraConfirmDialogInfoConfirmation dialog information displayed when others turn on your camera.ZegoDialogInfo
othersTurnOnYourMicrophoneConfirmDialogInfoConfirmation dialog information displayed when others turn on your microphone.ZegoDialogInfo
startLiveButtonUsed to customize the start live button. If the value is not empty, it will replace the default start live button.ZegoStartLiveButton
onStartLiveButtonPressedListener for when the default start live button is pressed. This will not be triggered if you customize the live button.View.OnClickListener
zegoLayoutConfiguration for layout, including picture-in-picture layout and gallery layout.ZegoLayout
screenSharingVideoConfigConfiguration for screen sharing, currently only supports setting the resolution. The default is 540P.ZegoPrebuiltVideoConfig
videoConfigConfiguration for video display, currently only supports setting the resolution. The default is 360P.ZegoPrebuiltVideoConfig
avatarViewProviderCustom user avatar. The live page will call this interface to set the user avatar at the appropriate time.ZegoAvatarViewProvider
pkBattleConfigConfiguration for host PK. Please refer to PK battles.ZegoLiveStreamingPKBattleConfig
beautyConfigConfiguration for the beauty plugin. The beauty plugin needs to be added for it to take effect. Please refer to Advanced beauty effects.ZegoBeautyPluginConfig
showMemberButtonWhether to show the member button in the upper right corner. The default value is true.boolean
host(boolean enableCoHosting)Creates a live configuration instance for the host role. The parameter determines whether to enable co-hosting. If co-hosting is enabled, the invite co-host button, user list more button, etc. will be displayed. If you need the co-hosting feature, you need to configure the signaling plugin. Please refer to the Quick Start section.
The default configuration for the host includes:
- Role set to host
- Automatically turn on the camera when entering the live streaming
- Automatically turn on the microphone when entering the live streaming
- Confirmation dialog before exiting the live streaming
You can continue to customize other parameters based on this.
Static method
audience(boolean enableCoHosting)Creates a live configuration instance for the audience role. The parameter determines whether to enable co-hosting. If co-hosting is enabled, the apply co-host button will be displayed. If you need this feature, you need to configure the signaling plugin. Please refer to the Quick Start section.
The default configuration for the audience includes:
- Role set to audience
You can continue to customize other parameters based on this.
Static method

ZegoPrebuiltAudioVideoViewConfig

View configuration class.

PropertyDescriptionType
showSoundWaveOnAudioViewWhether to display the sound wave effect on the audio view. Default is true.boolean
useVideoViewAspectFillWhether to scale the view to fill the entire view while maintaining the aspect ratio, which may result in some parts of the video being cropped. Default is true.boolean
providerThe foreground view provider, marked with the transient keyword to indicate that this field is not included during serialization. Please refer to Add custom UI components.ZegoForegroundViewProvider

ZegoBottomMenuBarConfig

Menu bar configuration class.

PropertyDescriptionType
hostButtonsList of menu bar buttons for the host.List<ZegoMenuBarButtonName>
coHostButtonsList of menu bar buttons for co-hosts.List<ZegoMenuBarButtonName>
audienceButtonsList of menu bar buttons for the audience.List<ZegoMenuBarButtonName>
menuBarButtonsMaxCountMaximum number of menu bar buttons. Default is 4.int
showInRoomMessageButtonWhether to show the in-room message button in the menu bar. Default is true.boolean

ZegoMemberListConfig

Member list configuration class.

PropertyDescriptionType
memberListItemViewProviderProvider for member list item view, used to customize the view of each member item in the member list.ZegoMemberListItemViewProvider

ZegoLiveStreamingPKBattleConfig

PK view configuration class.

PropertyDescriptionType
pkBattleViewTopProviderThe interface will be called at the appropriate time during the host's PK to get the custom view and display it at the top of the host's PK view.ZegoLiveStreamingPKBattleViewProvider
pkBattleViewBottomProviderThe interface will be called at the appropriate time during the host's PK to get the custom view and display it at the bottom of the host's PK view.ZegoLiveStreamingPKBattleViewProvider
pkBattleViewForegroundProviderThe interface will be called at the appropriate time during the host's PK to get the custom view and display it on top of the host's PK view.ZegoLiveStreamingPKBattleViewProvider
hostReconnectingProviderThe interface will be called at the appropriate time during the host's PK to get the custom view and display it on top of the reconnection view.ZegoLiveStreamingPKBattleViewProvider2

ZegoBeautyPluginConfig

Face Beautification plugin configuring class.

PropertyDescriptionType
effectsTypesConfigures which face Beautification effects to enable based on the ZegoBeautyPluginEffectsType enum.List<ZegoBeautyPluginEffectsType>
innerTextConfigures the internal text of the plugin, which can be used to adjust the text displayed in the UI.ZegoBeautyPluginInnerText
uiConfigConfigures the UI of the plugin, including images, text colors, and sizes.ZegoBeautyPluginUIConfig
enableFaceDetectionEnables face detection.boolean
beautyEventHandlerThe event handler for face Beautification events, used to handle events related to face Beautification.IBeautyEventHandler
segmentationBackgroundImageNameSpecifies the name of the image used for background segmentation.String