1.6 KiB
1.6 KiB
ECP-0071: Archive Replay DVR Endpoints
Context
ECP-0070 added relay archival (wt-archive) into CAS objects plus JSONL indexes, but there is no read path for viewers to scrub historical content.
Decision
Add an archive replay path with these pieces:
ec-node wt-archive-serve: lightweight HTTP server that reads archive JSONL indexes + CAS blobs and serves:/archive/<broadcast>/master.m3u8/archive/<broadcast>/video.m3u8/archive/<broadcast>/audio.m3u8/archive/<broadcast>/init.mp4/archive/<broadcast>/segment/<blake3>.m4s/archive/<broadcast>/timeline.json
- HLS playlists are
EVENTstyle and include all retained segments by default, so scrub depth is bounded by retained archive data (effectively "infinite" until eviction). - Cloudflare Worker proxies
/api/archive/*to a configurable archive origin (EC_ARCHIVE_ORIGIN) soevery.channelcan serve replay from the same site domain. - Web watcher adds an
Archive DVRmode that plays/api/archive/<broadcast>/master.m3u8with native HLS orhls.jsfallback. - NixOS module adds
services.every-channel.ec-node.archive.serve.*to run replay server alongside archival workers.
Rationale
- Keeps archival and replay in one binary and one deploy surface.
- Preserves CAS as source of truth; playlists are derived views.
- Uses standard HLS+DVR semantics so browser playback + scrubbing works without custom protocol work in the short term.
Reversibility
- Disable
archive.serve.enableand remove worker proxy route to revert to archive-only mode. wt-archivestorage format remains unchanged.