Skip to main content

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.

Building the WebRTS Client from source is useful when you need a local development environment, want to target a specific module format such as CommonJS or IIFE (for UMD/browser-global use cases), or want to run and tinker with the bundled examples before integrating the library into your own project.
Prerequisites — make sure the following are installed before you begin:
  • Node.js >=16
  • npm >=7
Both are bundled together when you download Node.js from nodejs.org.

Build steps

1

Clone the repository

git clone https://github.com/CeeblueTV/wrts-client.git
2

Install dependencies

cd wrts-client && npm install
3

Build the library

npm run build
The build places the following files into the /dist/ folder:
FileDescription
wrts-client.d.tsTypeScript type definitions
wrts-client.jsES module library (for npm consumers)
wrts-client.bundle.jsBundled browser library (for <script type="module">)
Each JavaScript file is accompanied by a minified .min.js version and a .map source map file for easier debugging.

Module format variants

By default, npm run build produces an ES module output. If your environment requires a different module format, use one of the following commands instead:
npm run build
The default compilation target is ES6, matching the library’s own TypeScript configuration ("target": "ES6" in tsconfig.json). You can experiment with a different ECMAScript target by passing -- --target esnext to any build command (for example, npm run build -- --target esnext), but custom targets are not officially supported and should be considered experimental.

Watch mode

During active development you can run a watcher that automatically rebuilds the bundles whenever a source file changes:
npm run watch

Running the examples

The repository ships with ready-to-run HTML examples. Because browsers block local file:// requests, you need to serve the project from a local HTTP server:
npx http-server . -p 8081
Then open your browser at http://localhost:8081/examples/player.html.
The player example (examples/player.html) accepts either a bare stream name or a full WRTS endpoint URL in its input field — for example https://<hostname>/wrts/out+<id>/index.json. Paste the uri value you obtained from the Ceeblue Cloud API or Dashboard to start playback immediately.

Building the API docs

The library’s API reference is generated with TypeDoc. To build it locally, run:
npm run build:docs
The generated documentation is written to ./dist/docs/api/. Open ./dist/docs/api/index.html directly in your browser, or serve it with the same http-server approach:
npx http-server . -p 8081
Run this command from the ./dist/docs/api/ directory, then visit http://localhost:8081/.

Lint and format

The project enforces code style with ESLint and Prettier. Git hooks run these checks automatically on every staged commit, but you can also invoke them manually:
npm run lint      # ESLint + Prettier check (read-only, exits non-zero on violations)
npm run eslint    # ESLint with auto-fix
npm run prettier  # Prettier with auto-write

Build docs developers (and LLMs) love