Config
ZegoUIKitPrebuiltLiveStreamingConfig
Configuration class for live streaming initialization.
Property | Description | Type |
---|---|---|
role | Defines the role of the user in the live streaming. The default value is ZegoLiveStreamingRole.AUDIENCE. | ZegoLiveStreamingRole |
turnOnCameraWhenJoining | Whether to automatically turn on the camera when joining the live streaming. The default value is false. | boolean |
turnOnMicrophoneWhenJoining | Whether to automatically turn on the microphone when joining the live streaming. The default value is false. | boolean |
turnOnCameraWhenCohosted | Whether to automatically turn on the camera when co-hosting. The default value is true. | boolean |
useSpeakerWhenJoining | Whether to use the speaker when joining the live streaming. The default value is true. | boolean |
audioVideoViewConfig | Configuration for audio and video views. Please refer to Hide components and Add custom UI components. | ZegoPrebuiltAudioVideoViewConfig |
bottomMenuBarConfig | Configuration for the bottom menu bar. Please refer to Customize the menu bar. | ZegoBottomMenuBarConfig |
memberListConfig | Configuration for the member list. | ZegoMemberListConfig |
confirmDialogInfo | If 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 |
zegoLiveStreamingEndListener | Listener 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 |
leaveLiveStreamingListener | Listener 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 |
removedFromRoomListener | Listener 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 |
translationText | Please refer to Modify User Interface text. | ZegoTranslationText |
enableCoHosting | Whether to enable co-hosting. | boolean |
markAsLargeRoom | Whether 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 |
needConfirmWhenOthersTurnOnYourCamera | Whether to require confirmation when others turn on your camera. The default value is true. | boolean |
needConfirmWhenOthersTurnOnYourMicrophone | Whether to require confirmation when others turn on your microphone. The default value is true. | boolean |
othersTurnOnYourCameraConfirmDialogInfo | Confirmation dialog information displayed when others turn on your camera. | ZegoDialogInfo |
othersTurnOnYourMicrophoneConfirmDialogInfo | Confirmation dialog information displayed when others turn on your microphone. | ZegoDialogInfo |
startLiveButton | Used to customize the start live button. If the value is not empty, it will replace the default start live button. | ZegoStartLiveButton |
onStartLiveButtonPressed | Listener for when the default start live button is pressed. This will not be triggered if you customize the live button. | View.OnClickListener |
zegoLayout | Configuration for layout, including picture-in-picture layout and gallery layout. | ZegoLayout |
screenSharingVideoConfig | Configuration for screen sharing, currently only supports setting the resolution. The default is 540P. | ZegoPrebuiltVideoConfig |
videoConfig | Configuration for video display, currently only supports setting the resolution. The default is 360P. | ZegoPrebuiltVideoConfig |
avatarViewProvider | Custom user avatar. The live page will call this interface to set the user avatar at the appropriate time. | ZegoAvatarViewProvider |
pkBattleConfig | Configuration for host PK. Please refer to PK battles. | ZegoLiveStreamingPKBattleConfig |
beautyConfig | Configuration for the beauty plugin. The beauty plugin needs to be added for it to take effect. Please refer to Advanced beauty effects. | ZegoBeautyPluginConfig |
showMemberButton | Whether 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.
Property | Description | Type |
---|---|---|
showSoundWaveOnAudioView | Whether to display the sound wave effect on the audio view. Default is true. | boolean |
useVideoViewAspectFill | Whether 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 |
provider | The 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.
Property | Description | Type |
---|---|---|
hostButtons | List of menu bar buttons for the host. | List<ZegoMenuBarButtonName> |
coHostButtons | List of menu bar buttons for co-hosts. | List<ZegoMenuBarButtonName> |
audienceButtons | List of menu bar buttons for the audience. | List<ZegoMenuBarButtonName> |
menuBarButtonsMaxCount | Maximum number of menu bar buttons. Default is 4. | int |
showInRoomMessageButton | Whether to show the in-room message button in the menu bar. Default is true. | boolean |
ZegoMemberListConfig
Member list configuration class.
Property | Description | Type |
---|---|---|
memberListItemViewProvider | Provider for member list item view, used to customize the view of each member item in the member list. | ZegoMemberListItemViewProvider |
ZegoLiveStreamingPKBattleConfig
PK view configuration class.
Property | Description | Type |
---|---|---|
pkBattleViewTopProvider | The 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 |
pkBattleViewBottomProvider | The 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 |
pkBattleViewForegroundProvider | The 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 |
hostReconnectingProvider | The 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.
Property | Description | Type |
---|---|---|
effectsTypes | Configures which face Beautification effects to enable based on the ZegoBeautyPluginEffectsType enum. | List<ZegoBeautyPluginEffectsType> |
innerText | Configures the internal text of the plugin, which can be used to adjust the text displayed in the UI. | ZegoBeautyPluginInnerText |
uiConfig | Configures the UI of the plugin, including images, text colors, and sizes. | ZegoBeautyPluginUIConfig |
enableFaceDetection | Enables face detection. | boolean |
beautyEventHandler | The event handler for face Beautification events, used to handle events related to face Beautification. | IBeautyEventHandler |
segmentationBackgroundImageName | Specifies the name of the image used for background segmentation. | String |