Skip to content
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

Macos tray icon #22

Merged
merged 8 commits into from
Apr 16, 2024
Merged

Conversation

richiemcilroy
Copy link
Contributor

@richiemcilroy richiemcilroy commented Apr 11, 2024

Solves #21

Added tray menu icon
Icon changes when recording starts or stops
When icon is clicked the window gets focus
Make all windows hide when recording stops.
Implement the tray "Show Cap" button
Copy link

vercel bot commented Apr 11, 2024

@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.

@richiemcilroy
Copy link
Contributor Author

Hey @ItsEeleeya - it's looking good! Almost there. However when I begin the recording the tray icon doesn't seem to change.

@ItsEeleeya
Copy link
Contributor

Hey, I checked this before pushing and it was working

Cap Recording
Built from my last commit

Now that I try building or running dev it either complains about resend api key not being there, or get a bunch of Next.js errors. (Tried deleting everything and pulling from commits, same results)
I'd greatly appreciate any advice or info on this since getting the project running was the most time consuming part. (and pulling from origin it behaves the same for me)
I set NEXT_PUBLIC_LOCAL_MODE=true in .env, but sometimes I feel it's not doing anything
Image below is just one example of the seemingly random errors I'm getting

huh

@richiemcilroy
Copy link
Contributor Author

Hmm if you go to Privacy & Security - do you have permissions enabled for the Terminal app for Screen Recording, Microphone, Camera?

I'll add this to the guide.

Let me know if that stops some of the errors

The minimum 5 second length wasn't seem to be respected after your first recording in the latest version.

The tray icon should now change more consistently
@ItsEeleeya
Copy link
Contributor

I changed where it triggers and fixed a small problem.
The icon changes when you successfully start recording and changes back to default when it stops

One small note, sometimes the app crashes on stop recording when whether I'm on this or the main branch but not the latest release. Is this known?

@richiemcilroy
Copy link
Contributor Author

Hey @ItsEeleeya - is this ready for me to re-review?

@ItsEeleeya
Copy link
Contributor

Hey @ItsEeleeya - is this ready for me to re-review?

For the tray icon, Yes.
The media device selection in my last commit is WIP.

It is nearly finished except for some UI de-sync that can happen
menu

Known issue: Selecting None for video input can result in de-sync and instead select the first real device.
…areas

Frontend media device pickers now sync with the tray device picker.

Rename Devices to Device.
Rename Device.deviceId to Device.id
Refactor Recorder.handleContextClick
@ItsEeleeya
Copy link
Contributor

Hey @richiemcilroy
It's ready for a review! Let me know if there are any refactors or renaming that should be reverted.
The selector context menu also uses the selected mark to be consistent with the tray selector

menu selected

@richiemcilroy
Copy link
Contributor Author

Hey @ItsEeleeya - works great! Only problem I can see is that the recording icon doesn't change to the stop icon when recording. Below is a screen recording of me starting a Cap recording

771cd745-7e10-427b-94fc-d26f2c15beba.mp4

@richiemcilroy
Copy link
Contributor Author

Also thanks for adding the context menu selector to the tray icon - will add $50 to the bounty

@ItsEeleeya
Copy link
Contributor

Hey @ItsEeleeya - works great! Only problem I can see is that the recording icon doesn't change to the stop icon when recording. Below is a screen recording of me starting a Cap recording

771cd745-7e10-427b-94fc-d26f2c15beba.mp4

That's odd, it has worked for me since the the first commit and I haven't been able to replicate that.
The event is triggered right inside Recorder.start_dual_recording()
Did you check for any possible errors or panics related to it?

From your video it seems that the icon changes a couple of seconds after stopping the recording which then immediately changes back.
I've moved it to trigger before the Tauri command is invoked
(Which might potentially make the icon stay as the stop icon if the command ever manages to fail and stop recording never gets called)

Hopefully this will resolve the issue

@ItsEeleeya
Copy link
Contributor

Also thanks for adding the context menu selector to the tray icon - will add $50 to the bounty

Of course! I'd also be happy to help to transition to Tauri v2 once it's stable and there aren't other priority issues that I can work on.
It will definitely make managing the tray and a lot more stuff much easier from the frontend

@richiemcilroy richiemcilroy marked this pull request as ready for review April 16, 2024 15:23
@richiemcilroy richiemcilroy merged commit 3d6765d into CapSoftware:main Apr 16, 2024
1 check failed
@richiemcilroy
Copy link
Contributor Author

Solves #21

@ItsEeleeya ItsEeleeya deleted the macos-tray-icon branch April 17, 2024 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants