The export modal can produce up to four files in one run: the media (WAV / MP3 / M4A / Ogg / MP4), a re-timed interactive transcript HTML, WebVTT captions, and SRT captions. Today each is handed to the browser as its own download (downloadBlob in js/media-export.js), with a 250 ms sleep between them so Safari doesn't drop all but the last.
That has a few rough edges:
- Multi-file downloads trigger a per-file prompt or a "download multiple files?" permission bar in most browsers.
- The interactive transcript links the media by filename, so the files only work if the user keeps them together. The modal already has to warn about this: "All exported files use this name… keep the downloads together in one folder."
- The 250 ms stagger is a workaround for a browser behaviour we'd stop depending on.
Proposal
Add a "Download as a single .zip" toggle to the export modal, shown only when the export will produce more than one file. When on, collect the outputs[] array that already exists and emit one <baseName>.zip containing all of them, replacing the staggered loop.
Notes on implementation:
- Everything is already a
Blob in outputs[], each with a final name. The change is confined to the tail of the export routine.
- No zip library is vendored today. The payload is almost entirely already-compressed media, so a minimal STORE-method (no deflate) zip writer is enough and avoids a dependency — deflating an MP4 buys nothing. Text captions would go in uncompressed too, which is fine at their size.
- Zip64 is worth a thought: a long MP4 export can exceed 4 GB, which the classic zip header can't express.
- Should the toggle default on when more than one file is selected? Leaning yes, since it makes the "keep them in one folder" warning unnecessary in that case.
Related: #289, #291, #292 (media export).
The export modal can produce up to four files in one run: the media (WAV / MP3 / M4A / Ogg / MP4), a re-timed interactive transcript HTML, WebVTT captions, and SRT captions. Today each is handed to the browser as its own download (
downloadBlobinjs/media-export.js), with a 250 ms sleep between them so Safari doesn't drop all but the last.That has a few rough edges:
Proposal
Add a "Download as a single .zip" toggle to the export modal, shown only when the export will produce more than one file. When on, collect the
outputs[]array that already exists and emit one<baseName>.zipcontaining all of them, replacing the staggered loop.Notes on implementation:
Blobinoutputs[], each with a finalname. The change is confined to the tail of the export routine.Related: #289, #291, #292 (media export).