Updated on 2025-04-18 GMT+08:00

Scenario 4: Meeting Control

Description

In most scenarios where the SDK is used for secondary development, the SDK provides a series of meeting control operations, such as muting/unmuting the microphone, enabling/disabling video, enabling/disabling speaker, sharing screens, and raising hands. The setConfConfig API can be used to customize settings and the getConfConfig API can be used to obtain real-time information.

Service Process

This process uses configuring sharing as an example. The setConfConfig API is called and the conf_config_change event is listened on.

  1. Call an API.

    Call the setConfConfig API in the SDK.

  2. Implement the notification function.

    Process the conf_config_change event.

  3. Call an API.

    (Optional) You can call the getConfConfig API to obtain the view information.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
// The input parameter is the key corresponding to sharing.
let params = {shareScreen: true};
HWMeeting.setConfConfig(params).then(() => {
      // API called.
      ...      
    }).catch((e) => {
      // API calling failed.
      ...
    });
}

1
2
3
4
5
6
7
8
// Event listening. Configure it before joining a meeting.
listener = HWMeeting.createEventListener();

HWMeeting.getEventList().forEach(event => {
  listener.on("conf_config_change", (eventData) => {
      ...
  });
}); 

1
2
3
4
5
6
7
8
// This API is used to query the meeting control status. Call it as required.
HWMeeting.getConfConfg("shareScreen").then((data) => {
  // Display the result.
  console.log(JSON.stringify(data));
}).catch((e) => {
  // API calling failed.
  ...  
});