-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add recording control deeplinks and Raycast extension #1587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add recording control deeplinks and Raycast extension #1587
Conversation
…are#1540) Extend the existing deeplink system with new actions for controlling recordings and device switching, then build a Raycast extension that uses those deeplinks for hands-free Cap control. New deeplink actions added to DeepLinkAction enum: - PauseRecording, ResumeRecording, TogglePauseRecording - SetCamera (switch or disable camera during/before recording) - SetMicrophone (switch or disable microphone during/before recording) - TakeScreenshot (capture a screenshot of a specified display/window) Also refactored the capture target resolution into a shared resolve_capture_target helper to reduce duplication. Raycast extension (raycast/) provides commands for: - Start/Stop/Pause/Resume/Toggle-pause recording - Switch microphone (lists system audio input devices) - Switch camera (lists system cameras) - Take screenshot - Open settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
15 files reviewed, 5 comments
Remove unused parseMicrophones function and dynamically detect the primary display name instead of hardcoding "Main Display" so the deeplinks work on any machine regardless of display naming.
- Use name.as_str() instead of *name deref in resolve_capture_target - Use ok_or_else for lazy error string allocation - Convert start-recording and take-screenshot to List views that enumerate displays via system_profiler instead of hardcoding - Update package.json command modes to "view" for display selection
Remove hardcoded "Main Display" fallback in start-recording and take-screenshot parseDisplays, and remove bogus "FaceTime HD Camera" fallback in switch-camera. When system_profiler parsing yields no results, return an empty list instead of guessing names that will fail on the desktop deeplink handler side.
ddc79ff to
3d8de3e
Compare
- Tighten DeepLinkAction type to string union for unit actions - Add exact-match hint to error messages in resolve_capture_target - Fix license field to match repo (AGPL-3.0-or-later)
|
Addressed remaining review feedback:
Working on a demo video to showcase all commands. |
Demo VideoThis demo showcases:
The video demonstrates how users can now control Cap recordings through deeplinks, enabling powerful automation and launcher integrations like Raycast. |
Summary
DeepLinkActionenum with 6 new actions:PauseRecording,ResumeRecording,TogglePauseRecording,SetCamera,SetMicrophone,TakeScreenshotresolve_capture_targetinto shared helper to reduce duplicationFixes #1540
Test plan
cap-desktop://action?value=<json>/claim Bounty: Deeplinks support + Raycast Extension #1540