Skip to content

fix(player-core): keep video zoom when the next step is zoomed - #7

Merged
AbianS merged 1 commit into
mainfrom
fix/keep-video-zoom-into-zoomed-step
Sep 25, 2026
Merged

AbianS merged 1 commit into
mainfrom
fix/keep-video-zoom-into-zoomed-step

Conversation

@AbianS

@AbianS AbianS commented Sep 25, 2026

Copy link
Copy Markdown
Member

Problem

A zoomed video step always eased out to full frame shortly before its end. When the next step was also zoomed, the camera bounced:

  • video → photo: the clip zoomed out, then the photo appeared at full frame and zoomed back in.
  • video → video: the clip zoomed out, then the next clip zoomed back in. Most visible on contiguous clips, where playback rolls straight through the cut.

Photo → photo already moved straight from one zoom to the next.

Fix

  • core/video-step.ts: new handsZoomTo(next). A zoomed clip keeps its zoom to the end when the next step (photo or video) has its own zoom. startVideoStep now takes the next step instead of a continuesIntoNext boolean and derives both decisions from it.
  • Player.svelte: a zoomed photo that follows a zoomed video starts at the video's framing and moves to its own zoom with applyInheritedZoom, instead of resetting to full frame first. Video → video needs no change: the video layer stays visible and keeps its transform.
  • When the next step has no zoom, the clip still eases out before its end, as before.

Tests

  • video-step.test.ts: no zoom-out before a zoomed photo or a zoomed clip, zoom-out still happens before an unzoomed photo.
  • Player.test.ts: from a zoomed video to a zoomed photo, and between two zoomed photos, the photo never passes through scale(1).
  • The new video tests fail without the fix. The full player-core suite passes (118 tests), along with check-types, Biome and size (29.14 KB / 35 KB).

@AbianS
AbianS merged commit f30c58f into main Sep 25, 2026
1 check passed
@AbianS
AbianS deleted the fix/keep-video-zoom-into-zoomed-step branch September 25, 2026 07:45
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