Customizing a Menu on the Participants Screen
This API is used to customize the following menus on the Participants screen:
1. buildParticipantMoreMenuItems: customizes the menu items (area 1 in Figure 1) on the right of the title bar.
2. buildParticipantItemMenuItems: customizes the menu (Figure 2) displayed when a user touches a participant (area 2 in Figure 1) in the participant list.
3. buildParticipantToolbarMenuItems: customizes the bottom menu bar (area 3 in Figure 1) of the Participants screen.
4. buildParticipantToolbarMoreMenuItems: customizes the menu (Figure 3) displayed when a user touches the More button (area 4 in Figure 1) at the bottom.
Application Scenarios
Menu items in the four areas on the Participants screen need to be customized.
Precautions
1. sdkConfig takes effect only when this configuration is passed during SDK initialization.
Customizing the Menu Items on the Participants Screen
Sample Code
1
|
sdkConfig.setParticipantMenuStrategy(new CustomParticipantMenuHandle()); |
Customizing a More Menu in the Participants List
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
public class CustomParticipantMenuHandle implements IParticipentMenuStrategy { @Override public List<IConfMenu> buildParticipantMoreMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); confMenus.add(new ParticipantShareMenu()); confMenus.add(new ContantMenu()); // [Demo] Add a custom menu. confMenus.add(new CustomMoreMenu()); return confMenus; } @Override public List<IConfMenu> buildParticipantItemMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); confMenus.add(new MuteOrUnmuteMenu()); confMenus.add(new CameraMenu()); confMenus.add(new HandsUpOrDownMenu().setDarkIcon(true)); confMenus.add(new SelectWatchOrCacnelMenu()); confMenus.add(new PrivateChatMenu()); confMenus.add(new BroastAndCacelMenu()); confMenus.add(new RenameMenu()); confMenus.add(new InviteOrCancelShareMenu()); confMenus.add(new GrantOrCancelLocalRecordMenu()); confMenus.add(new SetAttendeeMenu()); confMenus.add(new ReleaseOrRequestChairManMenu()); confMenus.add(new SetChairmanMenu()); confMenus.add(new SetOrCancelCoHostMenu()); confMenus.add(new MoveToWaitingRoomMenu()); confMenus.add(new RecallMenu()); if (HWMBizSdk.getPublicConfigApi().isChinaSite()) { confMenus.add(new CallOtherNumberMenu()); } confMenus.add(new HangupMenu()); confMenus.add(new AdmitMenu()); confMenus.add(new AutoAdmitMenu()); confMenus.add(new RemoveMenu()); // [Demo] Add a custom menu. confMenus.add(new CustomMoreMenu()); return confMenus; } @Override public List<IConfMenu> buildParticipantToolbarMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); //--------------Menus available only for hosts------------- confMenus.add(new MuteAllMenu()); confMenus.add(new CancelAllMuteMenu()); confMenus.add(new MoreMenu()); //--------------Menus available only for non-host users------------- confMenus.add(new HandsupMenu()); confMenus.add(new HandsDownMenu()); confMenus.add(new RequestChairmanMenu()); //-----------Demo of adding a custom menu---------- confMenus.add(new CustomMenu()); return null; } @Override public List<IConfMenu> buildParticipantToolbarMoreMenuItems() { List<IConfMenu> confMenus = new ArrayList<>(); confMenus.add(new ReleaseOrRequestChairManMenu()); confMenus.add(new AllowUnmuteOrNotMenu()); confMenus.add(new LockOrUnlockConfMenu()); // [Demo] Add a custom menu. confMenus.add(new CustomMoreMenu()); return confMenus; } } |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot