logo
On this page

Config

ZegoUIKitPrebuiltLiveAudioRoomConfig

Initialization related configuration class.

PropertyDescriptionType
roleDefines the role of the user in the live audio room. The default value is ZegoLiveAudioRoomRole.AUDIENCE.ZegoLiveAudioRoomRole
takeSeatIndexWhenJoiningThe seat position when joining the room, only valid when the user's role is host or speaker. The default value is -1, indicating no specified seat position.int
closeSeatsWhenJoinWhether to close all seats when joining the live audio room. Only effective when the role is host. The default value is true.boolean
hostSeatIndexesThe positions where only the host can take a seat. There is no default setting.List<Integer>
turnOnMicrophoneWhenJoiningWhether to automatically turn on the microphone when joining the live audio room. The default value is false.boolean
useSpeakerWhenJoiningWhether to use the speaker when joining the live audio room. The default value is true.boolean
userAvatarUrlThe URL of the user's avatar. Only supports links with the http or https protocol.String
userInRoomAttributesUser attributes in the room, which can control the display of UI elements or logical judgments according to business needs. Please refer to Customize User attributesMap<String, String>
bottomMenuBarConfigConfiguration of the bottom menu bar. Please refer to Customize the bottom menu bar buttons.ZegoBottomMenuBarConfig
confirmDialogInfoIf confirmDialogInfo is not empty, a confirmation dialog will be displayed when the host stops the live audio room, clicks the exit button, or presses the back key. The properties in confirmDialogInfo have been deprecated. Please use ZegoTranslationText .leaveRoomConfirmDialogInfo to modify the dialog text.ZegoDialogInfo
translationTextPlease refer to Modify user interface text.ZegoTranslationText
layoutConfigConfiguration of the live audio room layout. Please refer to Customize the seats.ZegoLiveAudioRoomLayoutConfig
seatConfigSeat configuration, including background icons, etc.ZegoLiveAudioRoomSeatConfig
inRoomMessageViewConfigConfiguration of the in-room message view in the live audio room.ZegoInRoomMessageViewConfig
removedFromRoomListenerTriggered when the user is removed from the room.ZegoMeRemovedFromRoomListener

ZegoBottomMenuBarConfig

Bottom menu bar configuration class.

PropertyDescriptionType
hostButtonsList of menu bar buttons for the host.List<ZegoMenuBarButtonName>
speakerButtonsList of menu bar buttons for the speaker.List<ZegoMenuBarButtonName>
audienceButtonsList of menu bar buttons for the audience.List<ZegoMenuBarButtonName>
menuBarButtonsMaxCountMaximum number of menu bar buttons. Default is 5.int
showInRoomMessageButtonWhether to show the in-room message button in the menu bar. Default is true.boolean
memberListConfigConfiguration for the member list.ZegoMemberListConfig

ZegoLiveAudioRoomLayoutConfig

Seat layout configuration class.

PropertyDescriptionType
rowConfigsList of row configurations, specifying how each row of seats is arranged and how elements are aligned. The default value is a list of two ZegoLiveAudioRoomLayoutRowConfig objects, each configured with 4 elements and aligned with SPACE_AROUND.List<ZegoLiveAudioRoomLayoutRowConfig>
rowSpecingThe spacing between each seat in a row. The default value is 0.int

ZegoLiveAudioRoomLayoutRowConfig

Class for configuring seat layout in each row.

PropertyDescriptionType
seatSpacingSpacing between seatsint
alignmentAlignment of seatsZegoLiveAudioRoomLayoutAlignment
countNumber of columns in each rowint

ZegoLiveAudioRoomSeatConfig

Class for seat configuration

PropertyDescriptionType
showSoundWaveInAudioModeWhether to show sound wave.boolean
foregroundViewProviderForeground view provider for customizing the foreground view of the seat.ZegoLiveAudioRoomSeatForegroundViewProvider
backgroundColorBackground color of the seat.@ColorInt int
backgroundImageBackground image of the seat.Drawable
openIconIcon for unlocked seat.Drawable
closeIconIcon for locked seat.Drawable
seatClickedListenerTriggered when the seat is clicked.ZegoSeatClickedListener

ZegoInRoomMessageViewConfig

Class for message view configuration

PropertyDescriptionType
visibleWhether the message view is visible.boolean
inRoomMessageItemViewProviderMessage item view provider for customizing the view of room messages.ZegoInRoomMessageItemViewProvider