Serves an audio file dump's waveform, a sub-resource of its dump, for the
player to seek on. The frontend builds the URL with dumpWaveformUrl.
lib/ffmpeg.ts makes it from the upload on first request and keeps it, so a
listener downloads a few hundred bytes of peaks rather than the file a
second time to decode it.
GET /api/dumps/:dumpId/waveform?v=&token=— public; a private dump's waveform needs its poster's mediatoken. Answers aDumpWaveform; 404 when the dump isn't an audio file or its audio can't be read.
v
default: Router
Mounted by api/main.ts behind the error, Open Graph and CORS middleware.
An APIException thrown by a handler becomes the JSON error response there.
Usage
import * as mod from "api/routes/waveforms.ts";