CapSoftware / Cap

Open source Loom alternative. Effortless, instant screen sharing.
https://cap.so
GNU Affero General Public License v3.0
3.63k stars 169 forks source link

macOS Raycast Extension #38

Closed ItsEeleeya closed 1 month ago

ItsEeleeya commented 3 months ago

Solves #28

Added deep-link support. The Raycast extension will be able to use these to send commands to Cap. Currently, you can start/stop recording with specified media devices, as well as open your account's Dashboard.

I'm not sure if this will interfere with the auth process. This should be tested.

To test on macOS, make sure you first build a debug version of the app via pnpm tauri:build --debug and then "install" it. (Putting the resulted .app into your Applications folder. Read more about it here Then run the app via pnpm dev

The structure of the deep-link scheme is like caprecorder://:command?parameters

Copy and paste the URI below into a browser to try it out: caprecorder://start-recording?mic_in_label=MacBook%20Pro%20Microphone&vid_in_label=FaceTime%20HD%20Camera

The URI must be encoded. You can also use none as the value for a media device label to disable it.

P.s: I'm not sure where to create the extension. Should it be under the packages directory?

vercel[bot] commented 3 months ago

@ItsEeleeya is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

ItsEeleeya commented 3 months ago

The extension is here

Screenshot showing Raycast open with the "Start Recording" command from Cap selected.

To test, make sure Cap is built with --debug and installed. Then it has to be running in development. For the extension, just npm install & npm run dev

ItsEeleeya commented 3 months ago

There will be a Form view that opens up once you invoke the Start Recording command, letting you select the input devices and then start your Cap. Getting the device labels probably has to be implemented in Swift.

ItsEeleeya commented 2 months ago

Updated the extension to allow for selecting the devices to record as seen below:

Screenshot showing Raycast open with the "Start Recording" command showing a form to select a microphone and camera to launch Cap with.

Tested with the commit 84c54a660933f8f87f277a46c4a04eebf4b96729.

Note: I'm not sure if this can happen, but both Cap and the extension use localized names for identifying the device. There could be a chance that having a different system language might result in a mismatch or cause either to fail.

ItsEeleeya commented 2 months ago

Hey @richiemcilroy, could you please have a look at this? I'd appreciate it if you could also check your Twitter messages!