import { createReadStream } from "node:fs"; import { stat } from "node:fs/promises"; import { Readable } from "node:stream"; import { absOf, pickWindow, resolveClaim, resolveClip, windowsFor } from "@/lib/report/serve.mjs"; import { readClaimDetail } from "@/lib/projects/report.mjs"; export const dynamic = "force-dynamic"; // The cached source window, served WHOLE with byte ranges. // // The alternative -- an ffmpeg slice per requested window, like // /api/clip/[key]/video does -- would put an encode in front of every drag. The // file is small (one clip plus its pad), immutable (its window is in its name), // and the browser only needs to be told where to seek: the bench sets // currentTime = t - fetchStart and windows entirely on the client. // // Range support is not optional for that. Without a 206 the