feat(recording): capture all displays simultaneously#234
Open
couragefalco wants to merge 2 commits intoJerryZLiu:mainfrom
Open
feat(recording): capture all displays simultaneously#234couragefalco wants to merge 2 commits intoJerryZLiu:mainfrom
couragefalco wants to merge 2 commits intoJerryZLiu:mainfrom
Conversation
…the active one Previously, ScreenRecorder only captured whichever display the mouse cursor was on (tracked via ActiveDisplayTracker). For multi-monitor setups this means large portions of the workday go unrecorded. This change makes captureScreenshot() iterate over all connected displays and save one JPEG per display per capture tick. The active display tracker is kept so the "primary" display field still reflects where the user is working. Storage impact: screenshot count scales linearly with display count (2x for dual monitors). The existing storage limit settings still apply. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The initial implementation cached the display list only during setupCapture(), which meant hot-plugged monitors wouldn't be picked up until a restart. Now captureScreenshot() fetches fresh SCShareableContent each tick, falling back to the cached list on error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
nextScreenshotURL()timestamp-based naming (millisecond precision avoids collisions)ActiveDisplayTrackeris preserved so the "active" display metadata still reflects where the user is workingMotivation
On multi-monitor setups, the current behavior only records whichever screen the mouse is on. This means significant portions of the workday (code on one screen, browser/docs on the other) go unrecorded and don't appear in the timeline.
Changes
ScreenRecorder.swift(only file changed):cachedDisplaysarray alongside existingcachedDisplaysetupCapture()now caches all displays fromSCShareableContentcaptureScreenshot()iterates over all displays instead of just onerefreshDisplay()updates the full display liststop()clears the display arrayStorage impact
Screenshot count scales linearly with display count (2x for dual monitors). The existing
storageLimitRecordingsBytessetting still applies and will naturally limit total storage.Test plan
🤖 Generated with Claude Code