-
Notifications
You must be signed in to change notification settings - Fork 256
feat: Add auto-zoom with cursor following functionality #67
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?
Conversation
- Added native cross-platform mouse tracking using uiohook-napi (Windows, macOS, Linux) - New electron/mouse-tracker.ts: Captures mouse movements, clicks, and scroll events during recording - New src/utils/cursorUtils.ts: Converts cursor events into zoom regions with focus keyframes - Auto-generates zoom regions centered on click locations - Smooth cursor following during zoom using Catmull-Rom spline interpolation - Added auto-zoom toggle in LaunchWindow - Added cursor overlay with customizable styles (Windows/Mac cursors, circle, ring, dot) - Cursor settings panel with size, opacity, style, and click animation options - Video bounds-aware cursor positioning (respects padding) Note: Mouse overlay during video editing is not working as intended and needs debugging
|
Dammit! You beat me to it haha. I was literally working on this. Thanks a lot for working on this. I'm going to take some time to review it since it is a pretty advanced feature and want to ensure it works as intended. But great job on this! Some things you might want to look into in the meanwhile... It would be nice to add like a demo of the feature walkthrough as requested in the template. Makes it easier to have a quick glance. The other thing I wanted to mention was during the first version of this app (when I was experimenting), there were issues across diff OS for Did you try building it and checking if the app works? |
|
haha no way! perfect timing. i’ve run this locally and tested a build via 'npm run dev' on windows end-to-end (recording → editor → auto-zoom playback) and it’s working as expected. i’ve also recorded a quick demo walkthrough (recorded via canvid, which was actually the inspiration for this update) to make the review easier. i haven’t yet validated a full build on linux or macOS though, so would love to know if it’s working there. Entire.screen.12-17-2025.10-16-30.mp4as you can see here, the overlay cursor is not replacing the recording's cursor as done in canvid. trying to figure it out, but could you please look into it once? |
|
I tested it out. Some running thoughts: The cursor following works accurately and the camera view is solid. BUT...here is where it gets confusing (for a user). After the automatic following, if I'm unhappy with a zoom portion, the zoom has a depth as well as position associated with it. I randomly move it around. It plays no role. Zoom level works, but the overlay in preview is pointless and is bad UX. Here is my suggestion:
There some other bugs like, if I customize the length of the zoom item let's say from default 2 seconds to let's say 4 seconds. the extra 2 seconds that are new, in that period ( it does not follow the mouse. just stuck there). There could be more, but I would like you to do some more testing. As for the cursor stuff, I would suggest you to remove all of it. We might be moving to FFMPEG and there might be a way to capture separate layers (one just the screen with no cursor and another layer of one with just the cursor and nothing else), this way we don't have to overlay the custom cursors (more issues with overlapping, size constraints, etc). Not sure if this will work but that is kind of the base idea. This is also a separate feature and I would like to keep this out of scope for now. I'll do a code review, once you address all of the above and do a thorough testing for all scenarios. Please make sure to list out all the cases you have tested (as it would be too much effort to record each case and share). But good stuff! |
Summary
This PR adds an auto-zoom feature that follows cursor movements during recording and automatically generates zoom regions based on click events.
Features Added:
1. Native Cross-Platform Mouse Tracking
2. Auto-Zoom Generation
3. Smooth Cursor Following
4. Cursor Overlay (WIP)
New Files:
Known Issues:
The mouse overlay during video editing is not working as intended. The cursor appears but the positioning/visibility seems off. Would appreciate if you could look into this - might be related to how video bounds are calculated or the coordinate transformation.
How to Test:
Let me know if you have any questions!