feat: add recording control deeplinks and Raycast extension - #1587
feat: add recording control deeplinks and Raycast extension#1587buildingvibes wants to merge 7 commits into
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
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. |
|
Hi team! Just following up - I've addressed all the review feedback from the automated reviewers (device ID handling, error messages, license field, TypeScript types) and posted a demo video showing the deeplinks and Raycast extension working. Would love to get a maintainer's eyes on this when you have a chance. Happy to make any further adjustments! |
|
Closing this along with the deeplinks and Raycast bounty (#1540), which we are not pursuing. Since that issue was opened we shipped the Cap CLI, which covers this need more completely than deeplinks would have: cap record starts and stops recordings, cap targets lists screens, windows and devices, plus screenshot, export, upload and library commands, all with --json output, and cap mcp for driving Cap from an agent. A Raycast extension can be built directly on the CLI, which is a better foundation than a URL scheme. This is not a reflection on your work, and leaving it unreviewed for this long is our failure. Sorry for the wasted effort, and thank you for taking the time. If you want to contribute again, the open bug reports are the most useful place and we will review promptly. |
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