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.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.
Prerequisites — make sure the following are installed before you begin:
- Node.js
>=16 - npm
>=7
Build steps
Build the library
/dist/ folder:| File | Description |
|---|---|
wrts-client.d.ts | TypeScript type definitions |
wrts-client.js | ES module library (for npm consumers) |
wrts-client.bundle.js | Bundled 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:
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:Running the examples
The repository ships with ready-to-run HTML examples. Because browsers block localfile:// requests, you need to serve the project from a local HTTP server:
http://localhost:8081/examples/player.html.
Building the API docs
The library’s API reference is generated with TypeDoc. To build it locally, run:./dist/docs/api/. Open ./dist/docs/api/index.html directly in your browser, or serve it with the same http-server approach:
./dist/docs/api/ directory, then visit http://localhost:8081/.