Skip to content

feat: show film thumbnails on My Videos cards - #175

Merged
PromSereyreaksa merged 1 commit into
mainfrom
feat/project-thumbnails
Oct 16, 2026
Merged

PromSereyreaksa merged 1 commit into
mainfrom
feat/project-thumbnails

Conversation

@PromSereyreaksa

Copy link
Copy Markdown
Member

Summary

My Videos (/videos) cards now show a still of each film instead of only a colour and initials.

  • Capture: about 2.5s after a cloud project's design settles, captureThumbnail (src/composition/thumbnail.ts) builds a hidden copy of the film. It uses the same runtime and export rasterizer, so the user's playhead never moves. It takes one frame 60% of the way into the opening scene and encodes it as a 480px WebP (JPEG on Safari). Measured sizes were about 3–6 KB, taking 0.1–1.5s in idle time.
  • When: once per project revision per tab, skipped while there are unsaved edits, a generation running or an export. Projects made before this get their first still the first time they're opened.
  • Gallery: each card's <img> loads only as the card scrolls near the screen, through fetch with credentials. The URL includes the revision and the API makes it cacheable for a year. The lettered cover stays underneath until the still loads, or stays if there is none. Portrait and square films show whole, on black. A still the editor just uploaded appears on its card right away, without being fetched back.

Needs COPPSARY/Motify-Backend#67 (new endpoints and a migration). Against an older API, uploads fail quietly and cards keep their lettered covers.

Testing

  • svelte-check: 0 errors. Full vitest suite: 703 passing.
  • New tests cover the frame choice, the per-tab stills cache (reuse, newer revision, seeded still, retry after failure) and the API client's upload and fetch.
  • Captured the Claude preset (16:9) and a dynamic 9:16 film in headless Chromium through Vite and checked the images by eye: correct frames, and the hidden copy is removed afterwards.
  • Not yet tested end to end against a migrated database.

After a cloud project's design settles, the editor draws one frame from
a hidden copy of the film (the playhead never moves), encodes it as a
480px WebP and uploads it once per revision. Gallery cards load their
still lazily as they scroll into view and keep the lettered cover until
it arrives.
@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
motionly Ready Ready Preview Oct 16, 2026 7:58am UTC

@PromSereyreaksa
PromSereyreaksa merged commit 8bff495 into main Oct 16, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
Preview — ea19f1b5 Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant