The Ceeblue WebRTS Client (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.
@ceeblue/wrts-client) is a TypeScript/JavaScript library that lets you embed live, low-latency video streams into any web page using a standard HTML <video> element. It is the client-side counterpart to Ceeblue Cloud’s WebRTS ingest and delivery infrastructure, and is designed for Ceeblue Cloud customers who want to build their own web video players rather than relying on an embedded player widget.
What is WebRTS?
Web Real-Time Streaming (WebRTS) is a transport-agnostic framework designed to deliver live video over the web with minimal latency. Unlike WebRTC — which uses a peer-to-peer signalling model that makes CDN caching difficult — WebRTS is built around HTTP/2 as its primary transport. HTTP/2 multiplexing allows segments to be delivered over a single persistent connection while remaining fully compatible with standard CDN infrastructure, reverse proxies, and browser security policies.WebRTS is not a replacement for HLS or DASH for video-on-demand. It is optimised specifically for live streams where latency and stall-resilience are the primary concerns. HLS/DASH readers are not compatible with a WebRTS endpoint.
<video> element.
Key capabilities
Low-latency live playback
HTTP/2-based streaming targets sub-second latency. The player continuously monitors its buffer and adjusts
playbackRate to stay at the live edge without stalling.Adaptive bitrate (ABR)
HTTPAdaptiveSource implements automatic multi-bitrate selection. The player picks the best video rendition based on available bandwidth and screen resolution, and switches seamlessly mid-stream.Adaptive frame skipping
When the network degrades and the buffer runs empty, the player can skip audio and video frames to recover quickly to the live edge rather than pausing. Frame skipping can be enabled or disabled per use case.
DRM via EME
Encrypted streams are played back through the browser’s Encrypted Media Extensions API. Widevine, PlayReady, and FairPlay are all supported, and the player negotiates the best key system for the current browser automatically.
CMCD metrics
Common Media Client Data (CMCD) telemetry can be sent back to the origin server on every request, either as HTTP headers or query-string parameters. This gives your CDN real-time insight into buffer health, bitrate, and stall events.
Custom source extensibility
The library exposes a
Source base class. You can implement your own source — for example, wrapping a WebSocket transport — and pass it to Player at construction time. WSSource and HTTPSource are included as additional built-in implementations alongside the default HTTPAdaptiveSource.How it works
The library is structured around three cooperating layers:-
Player— the public-facing class your application interacts with. It owns the<video>element, manages theMediaSource(orManagedMediaSourceon iOS/Safari), fires lifecycle events (onStart,onStop,onMetadata,onBufferChange), and exposes controls for track selection, DRM, CMCD, and playback rate. -
Source— an abstract data-fetch layer.Playerinstantiates a source (by defaultHTTPAdaptiveSource) and wires its output callbacks directly. The source fetches audio and video samples from the network and delivers them asMedia.Sampleobjects. You can provide your ownSourcesubclass to thePlayerconstructor to override this layer entirely. -
MediaPlayback— an internal MSE wrapper that receivesMedia.Sampleobjects from the source, writes them intoSourceBufferinstances, and manages buffer housekeeping (overflow recovery, gap flushing, past-buffer trimming).
Supported environments
| Requirement | Minimum version |
|---|---|
| Node.js | ≥ 16 |
| npm | ≥ 7 |
| Browser | Media Source Extensions (MSE) required |
| iOS / Safari | ManagedMediaSource API (Safari 17+) |
The library ships as an ES module by default. CommonJS and IIFE builds can be produced from source. See the Installation page for details.
Player class automatically detects ManagedMediaSource at runtime and falls back to it on platforms where MediaSource is unavailable (primarily iOS/iPadOS). No configuration is required — the detection is transparent. Be aware that on iOS and Safari, changing playbackRate during playback can produce audible glitches; the library documents how to disable rate adaptation on those platforms.
License
Ceeblue WebRTS Client is released under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Source code is available on GitHub at https://github.com/CeeblueTV/wrts-client. Any modifications you distribute — including running a modified version as a network service — must be made available under the same license.Quickstart
Build a working live stream player in under five minutes.
Player API reference
Explore every property, method, and event on the
Player class.