Skip to content

feat: add Studio current-frame capture#565

Merged
miguel-heygen merged 1 commit intomainfrom
fix/studio-current-frame-screenshot
Apr 29, 2026
Merged

feat: add Studio current-frame capture#565
miguel-heygen merged 1 commit intomainfrom
fix/studio-current-frame-screenshot

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

@miguel-heygen miguel-heygen commented Apr 29, 2026

Problem

Closes #555. Studio users could inspect the preview, but there was no first-class way to capture the current rendered frame as an image.

What this fixes

  • Adds a Capture action to the Studio header toolbar so it does not cover the video preview.
  • Downloads the current composition frame as a PNG using the current player time.
  • Extends the existing thumbnail route and Studio/CLI thumbnail generators with an explicit PNG format path while preserving JPEG thumbnails for existing previews.
  • Adds URL/filename utility coverage plus thumbnail route coverage for PNG requests.

Root cause

Studio already had frame thumbnail generation, but the API path was JPEG-oriented and the editor UI only used it for previews. There was no current-frame capture affordance wired to the player state.

Verification

Local

  • bun run --filter @hyperframes/core test src/studio-api/routes/thumbnail.test.ts
  • bun run --filter @hyperframes/studio test src/utils/frameCapture.test.ts src/player/components/PlayerControls.test.ts
  • bun run --filter @hyperframes/studio typecheck
  • bun run --filter @hyperframes/core typecheck
  • bun run --filter @hyperframes/cli typecheck
  • bunx oxlint packages/cli/src/server/studioServer.ts packages/core/src/studio-api/routes/thumbnail.test.ts packages/core/src/studio-api/routes/thumbnail.ts packages/core/src/studio-api/types.ts packages/studio/src/App.tsx packages/studio/src/icons/SystemIcons.tsx packages/studio/vite.config.ts packages/studio/src/utils/frameCapture.ts packages/studio/src/utils/frameCapture.test.ts
  • bunx oxfmt --check packages/cli/src/server/studioServer.ts packages/core/src/studio-api/routes/thumbnail.test.ts packages/core/src/studio-api/routes/thumbnail.ts packages/core/src/studio-api/types.ts packages/studio/src/App.tsx packages/studio/src/icons/SystemIcons.tsx packages/studio/vite.config.ts packages/studio/src/utils/frameCapture.ts packages/studio/src/utils/frameCapture.test.ts
  • git diff --check

Browser

<img width="1027" height="910" alt="image" src="https://github.com/user-attachments/assets/71973af4-0279-4074-9
Screenshot 2026-04-29 at 16 17 22
060-130839a2d419" />

@miguel-heygen miguel-heygen requested review from jrusso1020 and vanceingalls and removed request for jrusso1020 April 29, 2026 16:17
@miguel-heygen miguel-heygen force-pushed the fix/studio-current-frame-screenshot branch 2 times, most recently from 5ac7972 to d758d88 Compare April 29, 2026 20:14
@miguel-heygen miguel-heygen force-pushed the fix/studio-current-frame-screenshot branch from d758d88 to ee89893 Compare April 29, 2026 20:26
@miguel-heygen miguel-heygen merged commit ea3b708 into main Apr 29, 2026
41 checks passed
Copy link
Copy Markdown
Collaborator Author

Merge activity

@miguel-heygen miguel-heygen deleted the fix/studio-current-frame-screenshot branch April 29, 2026 20:48
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.

(studio) add button to capture screenshot of the current frame

2 participants