There are three ways to add the Ceeblue WebRTS Client to your project: install it from npm (the recommended path for any project that uses a bundler or Node.js), drop in the prebuilt browser bundle for environments without a build step, or clone the repository and build the output format you need from source. All three approaches give you the same runtime capabilities.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CeeblueTV/wrts-client/llms.txt
Use this file to discover all available pages before exploring further.
npm / package managers
Install@ceeblue/wrts-client from the npm registry using your preferred package manager.
"type": "module" in package.json) with TypeScript definitions at dist/wrts-client.d.ts.
Once installed, import from the package name in your source files:
Runtime dependencies
The following packages are installed automatically as dependencies:| Package | Version | Purpose |
|---|---|---|
@ceeblue/web-utils | ^7.9.0 | Shared utilities: logging, connection helpers, metrics, byte-rate measurement |
abortcontroller-polyfill | ^1.7.8 | AbortController polyfill for environments that do not natively support it |
Browser bundle
The package includes a self-contained browser bundle atdist/wrts-client.bundle.js. This file (declared as the browser field in package.json) bundles all runtime dependencies into a single file, making it suitable for use directly in a web page without any build tooling.
Load it with a <script type="module"> tag and import named exports as you would from the npm package:
Because the bundle uses ES module syntax (
import/export), the <script> tag must carry type="module". Classic <script> tags without type="module" will throw a syntax error.dist/wrts-client.bundle.js and its minified companion dist/wrts-client.bundle.min.js are available after running npm run build.
Building from source
Clone the repository, install dependencies, and run the build script to produce output files in the/dist/ folder.
Install dependencies
Build the library
/dist/ folder:| File | Description |
|---|---|
wrts-client.d.ts | TypeScript type definitions |
wrts-client.js | ES module library (npm entry point) |
wrts-client.bundle.js | Self-contained browser bundle (browser entry point) |
.min.js version and a .map source map file.Module format options
By default,npm run build produces an ES module output. Two alternative formats are supported via additional build scripts:
The default compilation target is ES6. Other targets (for example If your project requires a UMD-compatible bundle for a legacy environment, build the IIFE format (
esnext) can be passed manually on the command line for experimental use, but are not officially supported:npm run build:iife) and wrap the resulting file yourself. A first-party UMD build is not included in the published npm package.Watch mode
Run a watcher to automatically rebuild whenever source files change during development:--watch flag and rebuilds all output variants (normal, minified, and source map) for the selected format on every change.
Dependencies
The following packages are listed as runtime dependencies inpackage.json and are installed automatically when you add @ceeblue/wrts-client via npm:
| Package | Version | Purpose |
|---|---|---|
@ceeblue/web-utils | ^7.9.0 | Logging (log, LogLevel), connection helpers (Connect, NetAddress), byte-rate measurement (ByteRate), player statistics (PlayerStats), and other shared utilities used throughout the library |
abortcontroller-polyfill | ^1.7.8 | Polyfill for the AbortController / AbortSignal APIs used internally to cancel in-flight requests when player.stop() is called |