Updated on 2022-09-07 GMT+08:00

Installing SDK

If you have any questions during development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see the API Reference.

Installing SDK Using npm (Recommended)

  1. Ensure that the npm has been installed and run the npm -v command to check the npm version.
  2. Run the npm install esdk-obs-browserjs command to start the SDK installation.
  • In a Windows operating system, if a message is displayed indicating that the command is not internal or external when you run the npm command, add the npm installation directory (generally the installation directory of Node.js) to the environment variable Path.
  • You may need to restart the computer for the configured environment variable to take effect.
  • If a network error occurs when you use npm to install a dependency, use proxies.

Installing SDK Using the Source Code

The following uses OBS BrowserJS SDK of the latest version as an example:

  1. Download the OBS BrowserJS SDK development package.
  2. Decompress the development package to obtain folder examples (sample code), folder dist (SDK libraries), and file README.txt (feature description file of SDK versions).
  3. Import the SDK libraries to a browser's code.

    <script src="./esdk-obs-browserjs-without-polyfill-x.x.x.min.js"></script>

  • The SDK is integrated with axios as the HTTP library that depends on the promise feature.
  • The dist folder contains two versions of SDK libraries. If the browser you use does not support the promise feature, such as Internet Explorer 10 or 11, import library esdk-obs-browserjs-x.x.x.min.js.