Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ describe("shouldAutoApplyFreshRecordingZoomsForSource", () => {
expect(shouldAutoApplyFreshRecordingZoomsForSource(936, 1028, "win32")).toBe(true);
});

it("allows narrow macOS window captures (portrait windows) too", () => {
expect(shouldAutoApplyFreshRecordingZoomsForSource(936, 1028, "darwin")).toBe(true);
expect(shouldAutoApplyFreshRecordingZoomsForSource(1080, 1920, "darwin")).toBe(true);
});

it("does not block when source dimensions are not available yet", () => {
expect(shouldAutoApplyFreshRecordingZoomsForSource()).toBe(true);
});
Expand Down
9 changes: 5 additions & 4 deletions src/components/video-editor/timeline/zoomSuggestionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ export function shouldAutoApplyFreshRecordingZoomsForSource(
sourceHeight?: number,
platform?: string,
): boolean {
// Window capture on Windows legitimately produces portrait and near-square
// sources. Click telemetry is already normalized to that captured window, so
// its aspect ratio is not a reason to suppress interaction-based zooms.
if (platform === "win32") {
// Window capture on Windows and macOS legitimately produces portrait and
// near-square sources (e.g. recording a single vertical app window). Click
// telemetry is already normalized to that captured window, so its aspect
// ratio is not a reason to suppress interaction-based zooms.
if (platform === "win32" || platform === "darwin") {
return true;
}

Expand Down