Describe the bug
When a project is recorded in a 16:9 aspect ratio but the canvas is set to 1:1 (Square) in the editor, the auto-zoom and panning logic calculates the frame based on the entire 1:1 canvas (including the padding/background) rather than the actual 16:9 video layer. This causes the camera to zoom partially into the empty background areas (top or bottom) instead of keeping the recorded video in focus.
To Reproduce
- Record a screen in a 16:9 aspect ratio, intentionally clicking multiple times near the corners/edges of the screen.
- Open the recorded video in the editor.
- Change the project/canvas format to 1:1 (which adds background padding to the top and bottom).
- Press play and observe the auto-zoom and pan behavior around the clicks.
Expected behavior
The zoom and pan logic should anchor its calculations strictly to the bounding box of the recorded video layer (+ padding). When zooming in, it should magnify the actual screen content, completely ignoring the extra background padding added by the 1:1 canvas.
Screenshots

Describe the bug
When a project is recorded in a 16:9 aspect ratio but the canvas is set to 1:1 (Square) in the editor, the auto-zoom and panning logic calculates the frame based on the entire 1:1 canvas (including the padding/background) rather than the actual 16:9 video layer. This causes the camera to zoom partially into the empty background areas (top or bottom) instead of keeping the recorded video in focus.
To Reproduce
Expected behavior
The zoom and pan logic should anchor its calculations strictly to the bounding box of the recorded video layer (+ padding). When zooming in, it should magnify the actual screen content, completely ignoring the extra background padding added by the 1:1 canvas.
Screenshots