Running the Web SDK Demo
This section describes how to quickly compile and run the demo of the web SDK.
Environment Requirements
Ensure that the following environment requirements are met during the compilation and running of the web SDK demo.
Environment and Tool |
Version |
Description |
---|---|---|
OS |
Windows 10 Professional |
Hardware requirements
|
Visual Studio Code |
N/A |
N/A |
Node.js |
14.x |
N/A |
http-server |
0.12.3 |
N/A |
Requesting test resources and app IDs |
N/A |
For details, see Preparations. |
Procedure
- Download the SDK and demo source code.
- Download the ZIP package of the SDK by following the instructions provided in Table 1.
- Decompress the ZIP package to obtain the following files and directories:
Figure 1 Directory structure of the SDK package
- Download third-party libraries on which the web SDK demo depends.
The web SDK demo introduces four third-party library files. Download them in advance and save them in the directory of HWMeeting.js.
Figure 2 Downloading dependent third-party library files- You are advised to download the four files from the following websites:
https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.development.js
https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.development.js
https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js
https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css
- If the preceding addresses cannot be accessed, search for and download the files from the Internet.
- You are advised to download the four files from the following websites:
- Use Visual Studio Code to open files.
Figure 3 Opening folders
- Start local debugging on a specific port.
-
Before performing this step, ensure that Node.js has been installed.
-
Run the following command to install http-server:
1
npm install http-server -g
- Enter the path where meeting-demo.html is stored and run the following command to specify the port number to start the http-server:
1
http-server . -p 8000
Figure 4 Started - Open the following URL in Google Chrome.
URL: http://localhost:8000/meeting-demo-en.html
In Chrome 47 and later versions, the getUserMedia API allows only video and audio requests from secure and trusted clients, such as HTTPS and localhost. Therefore, localhost instead of the IP address in the compiler is used as the domain name. If the script of a page is loaded from a non-secure source, Chrome reports an error.
-
- Use the demo to join a meeting.
The following figure shows the demo in the browser.
Figure 5 Page displayed after the web demo is startedAfter you create a meeting or webinar using Huawei Cloud Meeting,
- You can use the meeting ID and password to join the meeting anonymously.
- You can also call the API for performing app ID authentication to obtain a token and join the meeting after login.
- You can select International to connect to Huawei Cloud Meeting (International).
Figure 6 In-meeting page of the web demo
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