HLS.js creates a loader instance per request, so MeshedFlow uses a SharedLoader pattern: playlists stay on the default loader, fragments share one MeshedFlow core, and ABR stats still flow back to HLS.js.
MAKE YOUR CDN THE FALLBACK.
MeshedFlow turns dense audiences into a verified WebRTC delivery mesh. Your player still uses HLS.js, your origin still serves the first safe copy, and your CDN remains the instant fallback. The upside is simple: fewer duplicate segment downloads when viewers are watching together.
$ cat delivery_pressure.txt
DENSE AUDIENCES SHOULD COST LESS.
Traditional CDN delivery sends the same segment from the edge to every viewer. MeshedFlow adds a second path for the moments where density is on your side: viewers who already hold verified bytes can serve nearby viewers, while the CDN keeps playback safe whenever the mesh is not the fastest path.
$ mesh trace --segment seg_04812.m4s
A HYBRID MESH, NEVER A BET.
- 01 INTERCEPT A shared HLS.js loader catches fragment requests and checks fresh buffer maps from connected peers on the same stream and rendition.
- 02 MATCH Rust/Tokio signaling edges pair viewers by stream, rendition, topology, and live registry presence, then route SDP/ICE across the edge cluster when needed.
- 03 VERIFY Segments and CMAF fragments are accepted only after origin-bound integrity checks; untrusted or unsigned data returns to trusted HTTP.
- 04 FALL BACK If a peer is missing, slow, capped, or unreachable, playback completes from your origin CDN without changing the player surface.
$ man meshedflow.engine
BUILT LIKE DELIVERY INFRASTRUCTURE.
The high-scale data plane speaks the existing SDK JSON protocol while handling WebSocket admission, peer presence, same-stream routing guards, and cross-edge SDP/ICE delivery.
Edges use TTL-backed Valkey/Redis presence so a peer can join one edge and still receive proposals or WebRTC control messages routed from another.
Origin-signed fragment manifests let peers advertise and serve verified moof+mdat fragments before a full segment finishes downloading. Rollout starts in advertise-only mode.
Fresh buffer maps, peer throughput, latency, in-flight limits, topology score, and range rescue decide whether a chunk rides the mesh or returns to HTTP.
Remote JSON policy can tune timeouts, peer counts, CMAF mode, upload caps, stream overrides, or kill the mesh for a stream without redeploying the player.
$ meshedflow init --player hls.js
DROP IT INTO A PILOT STREAM.
The current integration pattern keeps playlist loading on standard HTTP and routes media fragments through a shared MeshedFlow core. That gives the mesh one stable peer identity, one WebSocket, one cache, and clean HLS.js lifecycle behavior.
// HLS.js creates one loader per fragment. Share one mesh core.
import Hls from 'hls.js';
import { MeshedFlowLoader } from '@meshedflow/sdk';
class SharedLoader {
constructor() {
if (!SharedLoader.core) {
SharedLoader.core = new MeshedFlowLoader({
signalingUrl: 'wss://meshedflow.com/ws',
originBaseUrl: 'https://meshedflow.com',
streamId: 'pilot-stream',
peerId: 'viewer-' + crypto.randomUUID(),
remoteConfigUrl: '/meshedflow-routing.json',
enableRarestFirst: true,
cmafMode: 'advertise-only',
});
}
this.core = SharedLoader.core;
}
load(context, config, callbacks) {
this.currentRequest = this.core.load(context, config, callbacks);
}
abort() {
if (this.currentRequest) this.currentRequest.abort();
}
destroy() {}
}
const hls = new Hls({
loader: SharedLoader,
pLoader: Hls.DefaultConfig.loader,
});
hls.loadSource('https://your-origin.example/live.m3u8');
hls.attachMedia(videoElement);
MIT licensed SDK - HLS.js 1.5 peer dependency - Chrome 80+ - Firefox 76+ - Safari 14+ - Edge 80+
$ meshedflow bench --latest --good-news
THE CANARY HAS TEETH.
Current evidence is strongest where MeshedFlow is supposed to shine: controlled offload validation, signed CMAF fragment flow, and high-density signaling. The public story should lead with those strengths and invite each customer pilot to validate its own traffic shape.
$ meshedflow billing --explain
PAY FOR BANDWIDTH YOU NO LONGER BUY.
Start with a measured pilot on one stream or one event class. The cleanest commercial model is tied to verified offloaded bytes: MeshedFlow earns when your CDN egress falls, and the pilot report shows the math before a wider rollout.
$ meshedflow deploy --pilot-stream
ROUTE THE FIRST VERIFIED SEGMENT.
Pick a dense stream, enable telemetry, start in advertise-only mode for CMAF, then let the dashboard prove exactly how many bytes the audience can carry for itself.