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.
To install an OBS BrowserJS SDK, see Table 1.
No. |
Method |
---|---|
1 |
Manually downloading and installing the source code development package |
2 |
Using the npm command |
Manually Downloading and Installing the Source Code Development Package
The following uses OBS BrowserJS SDK of the latest version as an example:
- Download the OBS BrowserJS SDK development package.
- Decompress the development package to obtain folder examples (sample code), folder dist (SDK libraries), and file README.txt (feature description file of SDK versions).
- 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.
Using the npm Command
- Ensure that the npm has been installed and run the npm -v command to check the npm version.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.