fix(windows): hide native desktop cursor during browser capture#79
fix(windows): hide native desktop cursor during browser capture#79LILQK wants to merge 2 commits intowebadderall:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request refactors display media capture in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment Tip You can enable review details to help with troubleshooting, context usage and more.Enable the |
|
PR removes system-audio capture path for Windows browser capture, please fix |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/hooks/useScreenRecorder.ts`:
- Around line 577-583: The cursor:"never" constraint set in
displayMediaVideoConstraints gets lost when applyConstraints() is called; update
the applyConstraints() call on the videoTrack (in useScreenRecorder.ts) to
include cursor: "never" along with frameRate, width, and height (use the
existing TARGET_FRAME_RATE, TARGET_WIDTH, TARGET_HEIGHT constants) and cast to
MediaTrackConstraints so the cursor constraint persists.
- Around line 604-611: The catch block that handles audio capture errors in
useScreenRecorder (around the getDisplayMedia call producing screenMediaStream)
must not retry with audio: false when the user cancelled or denied the share
dialog; modify the catch for audioError to inspect audioError.name (or
error.code) and if it is "NotAllowedError" or "AbortError" (or clearly indicates
user denial/abort) then rethrow or return/exit instead of calling
navigator.mediaDevices.getDisplayMedia again; only perform the fallback to
video-only for other error names (non-user-denial/unrecoverable) so that user
cancellations don't trigger a second picker.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f4081559-ae2d-47e5-b1af-25ea30a3fcdb
📒 Files selected for processing (2)
-src/hooks/useScreenRecorder.ts
💤 Files with no reviewable changes (1)
e82232f to
b8a6d85
Compare
Summary
getDisplayMediaconstraints withcursor: "never"Why
On Windows, recordings could show the OS cursor again, which caused a duplicate cursor when Recordly renders its own cursor layer. This brings back the previous expected behavior where only Recordly's cursor rendering is visible.
Notes
src/hooks/useScreenRecorder.tsis includedAGENTS.mdis intentionally not part of this PRSummary by CodeRabbit