Scenario 7: Joining a Meeting
Description
You can call this API to join a meeting using a meeting ID and password regardless of whether you have logged in to Huawei Cloud Meeting or not.
Service Process
When using the SDK to join an existing meeting, call the joinConfById API and implement the API callback function onJoinConfByIdResult and subscribed-to message notifications onConfStateChanged and onConfInfoNotify.
- Call the API.
- Assemble the data structure JoinConfByIdInfo and the API callback function onJoinConfByIdResult.
- Call the joinConfById API. The data in the preceding step is used as input parameters.
- Implement the callback function.
Implement the onJoinConfByIdResult function.
- Implement the notification function.
Implement the onConfStateChanged function.
- Implement the notification function.
Implement the onConfInfoNotify function.
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
async goToJoinConfById() { let { confId, password, nickName, isSpeakerOff, isMicOn, isCameraOn } = this.state; let param = { confId: "989156631", password: "******", nickName: "Hangzhou site", isSpeakerOff: false, // The speaker is not muted by default after a user joins the meeting. isMicOn: true, // The microphone is enabled by default after a user joins the meeting. isCameraOn: false, // The camera is disabled by default after a user joins the meeting. } const apiService = new ApiService(); let setResult = await apiService.joinConfById(param); if(setResult.ret != 0){ window.electron.ipcRenderer.send("show-error-alert", "joinConfById error = " + setResult.ret); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/** * Definition of joinConfById API in ApiService */ async joinConfById(joinConfByIdInfo) { return new Promise((resolve) => { let resultCallback = (ret, reason) => { console.log("joinConfById, out data = ", { ret, reason }); resolve({ ret, reason }); }; console.log("joinConfById, in param = ", joinConfByIdInfo); this.uisdkService.getConfCtrlApi().joinConfById(joinConfByIdInfo, resultCallback); }); } |
The onConfStateChanged and onConfInfoNotify event notification scenarios are the same as the meeting creation scenario. For details, see Scenario 6: Creating a Meeting.
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