Skip to content

fix(frontend): preserve unusual video aspect ratios - #1521

Merged
hmans merged 6 commits into
mainfrom
hmans/investigate-video-aspect-ratios
Jul 14, 2026
Merged

fix(frontend): preserve unusual video aspect ratios#1521
hmans merged 6 commits into
mainfrom
hmans/investigate-video-aspect-ratios

Conversation

@hmans

@hmans hmans commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve posted videos at their intrinsic display aspect ratio without cropping
  • remove the old 16:9 presentation heuristic and its cover crop overrides
  • override Vidstack's internal 16:9 default so normal ratios use the measured
    attachment frame with contain
  • clamp only the player canvas to 9:16–16:9 for extreme media, letterboxing the
    complete video so Vidstack's controls retain usable space
  • retain the existing maximum width and height so every player remains bounded
    in the timeline
  • document the behavior and tradeoff in FDR-008

Verification

  • mise lint-frontend
  • mise x -- pnpm exec vitest --run --project=client src/lib/components/chat/VideoPlayer.svelte.spec.ts (8 tests)
  • Svelte autofixer for VideoPlayer.svelte
  • Prettier check for changed files
  • git diff --check

Closes #1520.

@hmans
hmans marked this pull request as draft July 14, 2026 08:35
@hmans hmans changed the title fix(frontend): frame near-square portrait videos fix(frontend): preserve unusual video aspect ratios Jul 14, 2026
@hmans
hmans marked this pull request as ready for review July 14, 2026 08:54
@hmans
hmans merged commit 106ab5f into main Jul 14, 2026
11 checks passed
@hmans
hmans deleted the hmans/investigate-video-aspect-ratios branch July 14, 2026 09:14
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.

fix(frontend): preserve unusual video aspect ratios

1 participant