Presenter: Live Capture + Relay + Remote Annotation
Live presentation relay system — Electron capture (PC) + Docker hub (relay) + iPad PWA viewer with video/ink sync over WebSocket.
A three-tier real-time presentation system: the PC captures and encodes video via native GPU pipelines (NVENC, DXGI, WGC), ships frames to a relay hub, and viewers connect from iPad or browser to watch + annotate live. Overlay mode floats the toolbar transparently over the desktop; annotations sync as CBOR packets over WebSocket.
- TypeScript
- React
- Electron
- Node.js
- WebSocket (ws)
- CBOR (cbor-x)
- WebCodecs
- Docker
- C++ (native addon)
- DirectComposition
- NVENC
- Tailwind CSS
At its core, Presenter bridges desktop capture to remote viewers. The Electron PC app captures the desktop (or individual windows), compresses video with hardware encoders (NVIDIA NVENC, Intel QSV, or software fallback), and routes frames either to an embedded in-process hub or to a Docker-hosted relay server. The viewer side is a PWA that runs on iPad or web browsers, connected over WebSocket, receiving video frames and broadcasting annotation strokes (pen, arrow, text, image) back to all participants in real time.
The architecture is built around three deployment modes. Local mode pairs a single iPad directly to the PC via QR code—zero external infrastructure. Embedded mode spins up a lightweight Node.js hub inside the Electron process itself, so viewers on the local network can connect without Docker. External hub mode connects to a remote Docker container, supporting multiple rooms and member rosters, ideal for large streams or VPS deployment. All three modes use the same CBOR protocol and can be switched at runtime.
The system's centerpiece is a transparent overlay window on Windows that floats the toolbar and annotation UI over the live desktop without obscuring what's being presented. This required solving multiple DirectComposition, DWM cloak, and opacity bugs specific to Chromium on Win11. The native addon (C++, presenter_stream.node) handles OS-level capture, GPU composition, encoder probing, and cursor tracking; the renderer coordinates layers, annotations, recording, and stream dispatch. MP4 muxing happens in the main process to avoid starving the renderer's audio pump.
- GPU-accelerated capture and encoding: native DXGI/WGC capture on Windows, NVENC/QSV hardware encode, or WebCodecs fallback; live transcoding at 60fps 1440p.
- Three flexible transport modes: direct PC↔iPad pairing (QR), embedded in-process hub, or external Docker relay with multi-room rosters and moderation (kick, mute, ban, knock-to-enter).
- Transparent overlay on Windows: toolbar floats over the live desktop via WS_POPUP child windows and DirectComposition, with per-pixel alpha and zero occlusion of the presentation underneath.
- Real-time vector annotation sync: pen strokes, arrows, text, images pushed as CBOR packets over WebSocket, appearing instantly on all viewers; full undo/redo, layer hierarchy, and transform editing on the PC.
- Standalone relay server (Docker): handles room state, identity/authentication, chat, member presence, and fans video/ink to all clients; reachable via LAN mDNS or VPS HTTPS with self-signed cert trust.