Skip to content

fix(player-core): carry photo zoom into a zoomed video step - #6

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

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

Conversation

@AbianS

@AbianS AbianS commented Sep 25, 2026

Copy link
Copy Markdown
Member

Closes #3

Problem

A video step only inherited the previous photo's zoom when it had no panZoom of its own. With its own zoom, it ran the regular entry animation: an instant reset to full frame, then a zoom in.

Fix

  • applyInheritedZoomOut becomes applyInheritedZoom(target, inherited, own, …). The video starts instantly at the photo's framing and, on the next frame, moves:
    • to its own zoom with its own duration/easing, like two consecutive zoomed photos, or
    • back to identity with the photo's timing when it has no zoom (unchanged behavior).
  • Player now inherits the previous photo's zoom for every video step.

Tests

  • Unit test in media-zoom.test.ts: zoom to zoom, never through identity.
  • Integration test in Player.test.ts: from a zoomed photo to a zoomed video, the video layer's first transform is the photo's zoom, it never passes through scale(1), and it settles on the video's zoom. It fails without the fix.
  • Full player-core suite passes (113 tests), along with check-types, Biome and size (29.07 KB / 35 KB).

@AbianS
AbianS merged commit 4f74ff9 into main Sep 25, 2026
1 check passed
@AbianS
AbianS deleted the fix/carry-zoom-into-video-step branch September 25, 2026 07:31
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.

Carry zoom over from a zoomed photo step into a zoomed video step

1 participant