Updated on 2023-03-23 GMT+08:00

Customizing the Bottom Toolbar

meetingToolBarItemsForScene

API Description

This API is used to customize a meeting control menu at the bottom.

You can adjust the button display sequence or hide buttons in area 1 in the following figure.

A maximum of eight buttons can be displayed in area 2. Extra buttons will not be displayed.

You can only hide or display the button in area 3.

Figure 1 Customizing a meeting control menu at the bottom of a video meeting

Precautions

1. In the returned full array, use an empty array (@[ ]) to hide a button in a certain area.

2. If the current scenario or role does not support the transferred button, the button will not be displayed. For example, the invitation function is hidden for common participants.

Method Definition

1
- (nullable NSArray <NSArray <HWMToolBarItemModel *> *> *)meetingToolBarItemsForScene:(HWMConfToolBarScene)scene;

Parameter Description

scene: scenario where the bottom toolbar is customized. The options are as follows:

HWMConfToolBarSceneAudioCall: voice call.

HWMConfToolBarSceneVideoCall: video call.

HWMConfToolBarSceneAudioConf: voice meeting.

HWMConfToolBarSceneVideoConf: video meeting.

Return Values

None

Sample Code

Take a video meeting as an example:

The following code hides the Video button and adds a custom button. Figure 1 shows the effect.

 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
- (nullable NSArray <NSArray <HWMToolBarItemModel *> *> *)meetingToolBarItemsForScene:(HWMConfToolBarScene)scene {
    // Customize buttons on the bottom toolbar for the video meeting.
    if (scene == HWMConfToolBarSceneVideoConf) {
        // Microphone
        HWMToolBarItemModel *micItem = [HWMToolBarItemModel defaultMicrophoneItem];
        // Speaker
        HWMToolBarItemModel *speakerItem = [HWMToolBarItemModel defaultSpeakerItem];
        // Participants
        HWMToolBarItemModel *participantItem = [HWMToolBarItemModel defaultParticipantItem];
        // Share
        HWMToolBarItemModel *shareItem = [HWMToolBarItemModel defaultDataShareItem];
        // Chat
        HWMToolBarItemModel *chatItem = [HWMToolBarItemModel defaultChatItem];
        // Custom
        HWMToolBarItemModel *customItem = [[HWMToolBarItemModel alloc]init];
        customItem.title = @"Custom";
        customItem.selectedTitle = @"Select the custom button.";
        customItem.iconImage = [NSImage imageNamed:@"icon-customize-select-normal"];
        customItem.selectedIconImage = [NSImage imageNamed:@"icon-customize-select-selected"];
        customItem.disabledIconImage = [NSImage imageNamed:@"icon-customize-select-normal"];
    // More
        HWMToolBarItemModel *moreItem = [HWMToolBarItemModel defaultMoreItem];
        // Leave
        HWMToolBarItemModel *leaveItem = [HWMToolBarItemModel defaultLeaveItem];
        
        // Left area
        NSArray *leadingArray = @[micItem, speakerItem];
        // Middle area
        NSArray *centerArray = @[participantItem, shareItem, chatItem, customItem, moreItem];
        // Right area
        NSArray *trailingArray = @[leaveItem];

        // Return a full array. Use an empty array (@[]) to hide all buttons in a certain area.
        return @[leadingArray, centerArray, trailingArray];
    }
    return nil;
}