Each result card streamed its clip from /videos, which is served by the same single-worker API process that is running the renders, while the same clip was already archived to R2 (free egress, edge-served). The durable URL was in the browser the whole time and was only used as an error fallback. It becomes the playback source, but only while R2 holds exactly the file the server considers current: a server-side edit rewrites the clip and the re-archive behind it is fire-and-forget, so preferring the durable copy blindly would show the clip from BEFORE the edit. /api/history therefore returns the archived filename, and the card compares it against its own serverVideoFile. The map is chased after each edit and again once the job completes, since a job is marked completed before _archive_managed_job finishes uploading and the first read otherwise lands empty and never retries. The effect that reads it is keyed on the clip count instead of the results object, so it no longer re-reads the history on every status poll. The durable copy is never adopted under a player the user already started, because swapping src restarts playback. Display only: currentVideoUrl still drives the download button and every server operation (all of which pass input_filename, never a URL), so no edit can be routed to the wrong file by this. |
||
|---|---|---|
| .. | ||
| public | ||
| seo | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| eslint.config.js | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| vite-plugin-seo.js | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.