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

API Call in Typical Scenarios

Two Types of APIs

Web SDK APIs are classified into active calling APIs and message notification APIs.

Active calling APIs: Users actively call these APIs to complete tasks. The Promise object is returned after an API is called. Users can obtain the results through chain calling.

Message notification APIs: These APIs are called by the SDK to notify the application of events triggered by the Huawei Cloud Meeting server or the SDK. For example, the join_conf_result event indicates the meeting joining result.

API Call in Typical Scenarios

Figure 1 API call in typical scenarios

1. Check the browser compatibility (checkSystemRequirements) before starting a project.

2. Events are used to notify you of meeting joining, meeting control, and meeting leaving results. Create an event listener (createEventListener) before joining a meeting and select the required event to set up a listening channel.

3. When an API is called, a Promise object is returned. Implement calling success or failure results through chaining API calls. For example, after the hand-raising API is successfully called, whether the hand-raising action is complete depends on the received conf_config_change event.

4. To leave the meeting, call the leaveConf API of the SDK. If you forcibly end the process or close the web page, you may still exist in the participant list of other users for a short period of time.