Hybrid TypeScript/JavaScript implementation, with most core modules ported to TypeScript, for playing enhanced FLV (E‑FLV) and legacy FLV files in the browser via Media Source Extensions (MSE). Bundles a reusable mux/demux/remux library with a demo app. Currently supports main‑thread only; the worker pipeline is disabled.
Browse the live GitHub repository → <e-flv-js>
src/ – Sources for the demo app (demo-app.ts) and the mux/demux/remux/player library in mux-lib/../assets/ (e-rtmp-lab/assets/) – shared test clips available to all lab projects; auto‑discovered by the demo pickerassets/ – local test clips specific to this project; also auto‑discovered by the demo pickerdist/ – build output for the demo app and the mux libdemo-app.html – static shell that bootstraps the demo UInpm install
npm run devnpm run servehttp://localhost:8080/index.htmlThe demo ships with AV1 and Opus samples. Reload the page after adding new .flv files to ../assets/ (shared) or assets/ (local).
npm run build # outputs bundles into dist/
npm run type-check
npm run lint # temporary relaxed lint rules, will tighten later
npm run check # runs both commands above
The mux/remux player lives under src/mux-lib and is exported via the path alias @/mux-lib.
import { eflv, defaultConfig } from '@/mux-lib';
...
const player = eflv.createPlayer(mediaDataSource, config);
player.attachMediaElement(document.querySelector('video')!);
player.load();
player.play();
Review src/demo-app.ts for a wiring example that includes UI controls, telemetry hooks, and toggles between MP4 and WebM transmuxing paths.
Apache License 2.0. Portions derived from the original mpegts.js, project retain their upstream notices.