Install the SDK
There are two ways to install the TentuPlay SDK for JavaScript depending on whether the code executes in libraries (for example, React) or browser scripts.
-
Go to your project directory.
-
Type this at the command line.
npm install @tentuplay/js-client-sdk
-
Load the SDK in your application code.
import { TentuPlay } from '@tentuplay/js-client-sdk';
-
Download the JavaScript SDK file and save it in one of your lib folders.
-
Insert the script path into your web page.
<script src="YOUR_SDK_FILE_PATH"></script>