Repository navigation
feat: show film thumbnails on My Videos cards - #175
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
My Videos (
/videos) cards now show a still of each film instead of only a colour and initials.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.<img>loads only as the card scrolls near the screen, throughfetchwith 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.