fix(player-core): keep video zoom when the next step is zoomed - #7
Merged
Merged
Conversation
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.
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:
Photo → photo already moved straight from one zoom to the next.
Fix
core/video-step.ts: newhandsZoomTo(next). A zoomed clip keeps its zoom to the end when the next step (photo or video) has its own zoom.startVideoStepnow takes the next step instead of acontinuesIntoNextboolean 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 withapplyInheritedZoom, instead of resetting to full frame first. Video → video needs no change: the video layer stays visible and keeps its transform.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 throughscale(1).check-types, Biome andsize(29.14 KB / 35 KB).