capture_helper.gui module

Capture Helper — live multi-source scene configurator (single-page GUI).

This module holds nothing but the self-contained HTML document served by the FastAPI app at GET /gui (see capture_helper.api). It is deliberately build-step-free: one string of HTML + Tailwind (via CDN) + vanilla ES-module JavaScript. No bundler, no framework, no npm — the whole page is a static asset the API returns verbatim.

What the page does

  • Enumerate every camera and microphone on the host (GET /sources).

  • Add sources to a visual scene canvas (click a device to place it).

  • Live-preview each camera tile as an MJPEG stream (GET /preview/camera.mjpeg) and each microphone as a live level meter polled from GET /preview/mic-level.

  • Arrange camera tiles: drag to move, edit x/y/w/z in the inspector.

  • Save the design as a reusable JSON scene artifact (POST /scene/save) and load one back (POST /scene/load via file upload, or the server’s auto-populated scene from GET /scene).

The page adds no server-side logic — it is purely a friendlier front door to the same HTTP surface the CLI and MCP tools use. It mirrors the AI Helpers minimal GUI convention (Tailwind CDN + vanilla JS, reduced-motion guard, focus rings).

Author

Warith Harchaoui, Ph.D. — https://linkedin.com/in/warith-harchaoui/