API
ZegoUIKitPrebuiltLiveAudioRoomFragment
AudioRoom Widget.
You can add this Fragment into any Activity of your project to integrate the functionality of a call.
- function prototype:
Untitled/// You can create a project and obtain an appID from the [ZEGOCLOUD Admin >Console](https://console.zegocloud.com). final long appID; /// You can create a project and obtain an appSign from the [ZEGOCLOUD >Admin Console](https://console.zegocloud.com). final String appSign; /// The ID of the currently logged-in user. /// It can be any valid string. /// Typically, you would use the ID from your own user system, such as >Firebase. final String userID; /// The name of the currently logged-in user. /// It can be any valid string. /// Typically, you would use the name from your own user system, such as >Firebase. final String userName; /// The ID of the call. /// This ID is a unique identifier for the current call, so you need to >ensure its uniqueness. /// It can be any valid string. /// Users who provide the same roomID will be logged into the same room >for the call. final String roomID; /// Initialize the configuration for the liveaudioroom. final ZegoUIKitPrebuiltLiveAudioRoomConfig config; public static ZegoUIKitPrebuiltCallFragment newInstance(long appID, @NonNull String appSign, @NonNull String userID, @NonNull String userName, @NonNull String callID, @NonNull ZegoUIKitPrebuiltCallConfig config)
1
addButtonToBottomMenuBar
add your custom buttons to bottom menubar.It will show when user role equals to
role
Untitledpublic void addButtonToBottomMenuBar(List<View> viewList, ZegoLiveAudioRoomRole role)
1
setBackgroundView
set your custom views as background to the live audio room.You can also add room title view and show it in top of audio room by this method.
Untitledpublic void setBackgroundView(View view)
1
turnMicrophoneOn
open the microphone of specific user,if the target is not your userID,then the target will receive a onTurnOnYourMicrophoneRequest callback.
Untitledpublic void turnMicrophoneOn(String userID, boolean isOn)
1
removeSpeakerFromSeat
remove user from speaker
Untitledpublic void removeSpeakerFromSeat(String userID)
1
applyToTakeSeat
request take seat to be a speaker.First avaliable seat will be used.
Untitledpublic void applyToTakeSeat(ZegoUIKitPluginCallback callback)
1
cancelSeatTakingRequest
cancel take seat request.
Untitledpublic void cancelSeatTakingRequest()
1
takeSeat
try to take seat in position
index
Untitledpublic void takeSeat(int index)
1
leaveSeat
leave seat.If your are not speaker,nothing will happen.
Untitledpublic void leaveSeat()
1
acceptSeatTakingRequest
accept room user's take seat request.
Untitledpublic void acceptSeatTakingRequest(String audienceUserID)
1
rejectSeatTakingRequest
reject room user's take seat request.
Untitledpublic void rejectSeatTakingRequest(String audienceUserID)
1
inviteAudienceToTakeSeat
invite room user to take seat.
Untitledpublic void inviteAudienceToTakeSeat(String audienceUserID)
1
acceptHostTakeSeatInvitation
accept the take seat invitation from others.
Untitledpublic void acceptHostTakeSeatInvitation()
1
openSeats
make all seats avaiable.Room users can take empty seat directly.
Untitledpublic void openSeats()
1
closeSeats
make all seats locked.Room users should request to take empty seat.
Untitledpublic void closeSeats()
1