Updated on 2024-03-22 GMT+08:00

Preparations

Prerequisites

The SDK package has been downloaded.

Environment Requirements

  • You are advised to install Microsoft Visual Studio Code 1.43.2 or a later version for compilation.
  • If Node.js is used for development on the client, you are advised to install Node.js 14.19.1 or later.
  • For details about the supported browsers, see Browser Adaptation.
  • If you want to develop your client using TypeScript, the TypeScript version must be 3.8.3 or later.

SDK Integration

  1. Download the SDK to the local PC. You are advised to save the SDK package to a directory named sdk of your project.
  2. Introduce HWLLSPlayer to the project code.

    • To use the <script> mode to introduce the SDK, access HWLLSPlayer to obtain the exported module:
      <script src='./sdk/HWLLSPlayer.js'>
          console.log(HWLLSPlayer.getVersion())
      </script>
    • To directly reference the static JS file of SDK, reference the following code to access HRTC:
      import HWLLSPlayer from './sdk/HWLLSPlayer'
      console.log(HWLLSPlayer.getVersion())
    • To introduce the SDK in npm modularization mode, install the HWLLSPlayer module and introduce HWLLSPlayer to the development dependency of package.json, for example, "HWLLSPlayer": "./sdk/HWLLS_SDK_Web_*.*.*.***.tar.gz". Run the npm install command on the terminal (replace the version number with the actual one), and then run the following commands:
      import HWLLSPlayer from 'HWLLSPlayer'
      console.log(HWLLSPlayer.getVersion())