Event
- onSeatTakingRequested
- onSeatTakingRequestCanceled
- onSeatTakingInviteRejected
- onSeatTakingRequestRejected
- onHostSeatTakingInviteSent
- onMemberListMoreButtonPressed
- onSeatsChanged
- onSeatsClosed
- onSeatsOpened
- onSeatClosed
- onSeatOpened
- onTurnOnYourMicrophoneRequest
- onSeatClicked
- onUserCountOrPropertyChanged
- playAudioConfig
onSeatTakingRequested
This callback will be triggered to host when room host receive user's request to be a speaker.
- function prototype:
onSeatTakingRequested(audience)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatTakingRequested: (audience) => { //... }, }} />
onSeatTakingRequestCanceled
This callback will be triggered to host when room host receive audience's request to be a speaker and then canceled the request.
- function prototype:
onSeatTakingRequestCanceled(audience)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatTakingRequestCanceled: (audience) => { //... }, }} />
onSeatTakingInviteRejected
This callback will be triggered to host when room host invite audience to be speaker and is rejected by audience.
- function prototype:
onSeatTakingInviteRejected()
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatTakingInviteRejected: () => { //... }, }} />
onSeatTakingRequestRejected
This callback will be triggered to audience when room user request take seat and is rejected by room host.
- function prototype:
onSeatTakingRequestRejected()
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatTakingRequestRejected: () => { //... }, }} />
onHostSeatTakingInviteSent
This callback will be triggered to audience when room host invite users to be a speaker.
- function prototype:
onHostSeatTakingInviteSent()
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onHostSeatTakingInviteSent: () => { //... }, }} />
onMemberListMoreButtonPressed
This callback will be triggered to host when room host click more button of memebr list.
- function prototype:
onMemberListMoreButtonPressed(userInfo)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onMemberListMoreButtonPressed: (userInfo) => { //... }, }} />
onSeatsChanged
This callback will be triggered when room speaker changed.
- function prototype:
onSeatsChanged(takenSeats, untakenSeats)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatsChanged: (takenSeats, untakenSeats) => { //... }, }} />
onSeatsClosed
This callback will be triggered when room host close all seats.
- function prototype:
onSeatsClosed()
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatsClosed: () => { //... }, }} />
onSeatsOpened
This callback will be triggered when room host open all seats.
- function prototype:
onSeatsOpened()
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatsOpened: () => { //... }, }} />
onSeatClosed
This callback will be triggered when room host close seat of position index.
- function prototype:
onSeatClosed(index)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatClosed: (index) => { //... }, }} />
onSeatOpened
This callback will be triggered when room host open seat of position index.
- function prototype:
onSeatOpened(index)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatOpened: (index) => { //... }, }} />
onTurnOnYourMicrophoneRequest
This callback will be triggered when other user try to open your microphone.
- function prototype:
onTurnOnYourMicrophoneRequest(formUser)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onTurnOnYourMicrophoneRequest: (formUser) => { //... }, }} />
onSeatClicked
This callback will be triggered when host or audience click the seat.
- function prototype:
onSeatClicked(index, user)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onSeatClicked: (index, user) => { //... }, }} />
onUserCountOrPropertyChanged
This callback will be triggered when room user count changed or property changed.
- function prototype:
onUserCountOrPropertyChanged(userList)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ onUserCountOrPropertyChanged: (userList) => { //... }, }} />
playAudioConfig
If there is an audience in the audio room and they take a seat become speakers, this callback will be triggered. If you return false in this callback, you will not hear the voice of the speaker.
- function prototype:
playAudioConfig(localUserID, localRole, speaker)
- example:
<ZegoUIKitPrebuiltLiveAudioRoom appID={Your_APPID} appSign={Your_APPSign} userID={Your_UserID} userName={Your_UserName} roomID={roomID} config={{ playAudioConfig: (localUserID, localRole, speaker) => { //... // Returning true means to play the audio from the speaker. // Returning false means to mute the speaker. return true; }, }} />