Updated on 2025-05-29 GMT+08:00

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.

Table 1 Environment requirements

Environment and Tool

Version

Description

OS

Windows 10 Professional

Hardware requirements

  • CPU: i5-2400 quad-core, 3.1 GHz or above
  • Memory: 4 GB or above

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

  1. Download the SDK and demo source code.

    1. Download the ZIP package of the SDK by following the instructions provided in Table 1.
    2. Decompress the ZIP package to obtain the following files and directories:
      Figure 1 Directory structure of the SDK package

  2. 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.

  3. Use Visual Studio Code to open files.

    Figure 3 Opening folders

  4. Start local debugging on a specific port.

    1. Before performing this step, ensure that Node.js has been installed.

    2. Run the following command to install http-server:

      1
      npm install http-server -g
      
    3. 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
    4. 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.

  5. 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 started

    After you create a meeting or webinar using Huawei Cloud Meeting,

    1. You can use the meeting ID and password to join the meeting anonymously.
    2. You can also call the API for performing app ID authentication to obtain a token and join the meeting after login.
    3. You can select International to connect to Huawei Cloud Meeting (International).
    Figure 6 In-meeting page of the web demo