logo
On this page

Config

ZegoUIKitPrebuiltLiveAudioRoomConfig

Initialization related configuration

PropertyDescriptionType
roleDefines the role of the user in the live audio room. The default value is .audience.ZegoLiveAudioRoomRole
takeSeatIndexWhenJoiningThe seat position when joining, only valid when the user's role is host or speaker. The default value is -1, indicating no specified seat position.Int
hostSeatIndexesThe seat positions that only the host can take. No default setting.[Int]
turnOnMicrophoneWhenJoiningWhether to automatically turn on the microphone when joining the live audio room. The default value is false.Bool
useSpeakerWhenJoiningWhether to use the speaker when joining the live audio room. The default value is true.Bool
userAvatarUrlThe URL of the user's avatar. Only supports links with the http or https protocol.String
userInRoomAttributesThe attributes of the user in the room, which can control the display of UI elements or logical judgments according to business needs.[String : String]
bottomMenuBarConfigConfiguration of the bottom menu bar. Please refer to Customize the bottom menu bar buttons.ZegoBottomMenuBarConfig
confirmDialogInfoThe confirmation dialog information displayed when the exit button is clicked, providing default UI. If you need to customize it, you can set it through this parameter.ZegoLeaveConfirmDialogInfo
translationTextSupports switching the language environment of UIKit and modifying specific text. Please refer to Modify user interface text.ZegoTranslationText
layoutConfigLayout configuration. Please refer to Customize the seats.ZegoLiveAudioRoomLayoutConfig
seatConfigSeat configuration, including background icons, etc.ZegoLiveAudioRoomSeatConfig

ZegoBottomMenuBarConfig

Bottom menu bar configuration

PropertyDescriptionType
hostButtonsList of menu bar buttons for the host.[ZegoMenuBarButtonName]
speakerButtonsList of menu bar buttons for the speaker.[ZegoMenuBarButtonName]
audienceButtonsList of menu bar buttons for the audience.[ZegoMenuBarButtonName]
maxCountMaximum number of menu bar buttons. Default value is 5.Int
showInRoomMessageButtonWhether to show the in-room message button in the bottom menu bar. Default value is true.Bool

ZegoLiveAudioRoomLayoutConfig

Seat layout configuration

PropertyDescriptionType
rowConfigsA list of row configurations that specify 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 .spaceAround[ZegoLiveAudioRoomLayoutRowConfig]
rowSpecingThe spacing between each seat in a row. The default value is 0.Int

ZegoLiveAudioRoomLayoutRowConfig

Configuration for each row of seat layout.

PropertyDescriptionType
seatSpacingThe spacing between seats.Int
alignmentThe alignment of seats. Default is .center.ZegoLiveAudioRoomLayoutAlignment

ZegoLiveAudioRoomSeatConfig

Single seat configuration

PropertyDescriptionType
showSoundWaveInAudioModeWhether to display sound waves around the user's avatar. Default is true.Bool
backgroudColorSeat background color.UIColor
backgroundImageSeat background image.UIImage

ZegoLeaveConfirmDialogInfo

Information for the leave live audio room confirmation dialog

PropertyDescriptionType
titleTitle text.String
messageConfirmation message text.String
cancelButtonNameCancel button text.String
confirmButtonNameConfirm button text.String
dialogPresentVCThe view controller where the leave live audio room confirmation dialog is displayed. By default, it is displayed in the current live audio room.UIViewController

ZegoLiveAudioRoomRole

Role enumeration

EnumerationDescription
hostHost.
speakerSpeaker.
audienceAudience.

ZegoMenuBarButtonName

Menu bar button name enumeration

EnumerationDescription
leaveButtonLeave live audio room button.
toggleMicrophoneButtonToggle microphone button.
showMemberListButtonShow member list button.
switchAudioOutputButtonShow speaker button.
closeSeatButtonShow lock/unlock seat button.
applyTakeSeatButtonShow apply for co-host button.

ZegoUIKitLanguage

UI language enumeration

EnumerationDescription
ENGLISHUIKit displays in English.
CHSUIKit displays in Chinese.

ZegoLiveAudioRoomLayoutAlignment

Layout alignment enumeration

EnumerationDescription
spaceAroundDistribute items evenly with space around them, leaving space on both sides.
spaceBetweenDistribute items evenly with space between them.
spaceEvenlyDistribute items evenly with equal space between them.
startAlign items to the start.
endAlign items to the end.
centerAlign items to the center.