Repository navigation
feat: Implement desktopCapturer.setSkipCursor - #28302
adityak368 wants to merge 10 commits into
Conversation
|
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
|
@adityak368 If there's anything you need help with to make this PR successful, let me know! |
|
Try to run the tests locally on your machine, I believe you will be able to reproduce the crashes |
zcbenz
left a comment
There was a problem hiding this comment.
Can you add some tests? We don't have to test its functionality, it would be helpful to know it does not crash after Chromium upgrades.
|
Tested this on Mac. Looks good. |
|
This PR requires review from @electron/wg-upgrades, and requires API review from @electron/wg-api . |
|
The change looks good to me, if you can restore the author on the first commit that would be nice. (in principle it would have been preserved if you did git cherry-pick) Thanks! |
nornagon
left a comment
There was a problem hiding this comment.
This is a significant sized patch with no champion in the maintainers group, and no functional tests. It is thus very likely to cause issues when upgrading in future.
There are a few possible paths forward for this to get merged. The first and best is to see if there is a way to achieve the same result without requiring a patch. I am not personally familiar with the code, but I think this is worth investigating.
If there really is no way to achieve this functionality without a patch, the next step would be to see if we can drastically reduce the size of the patch. Smaller patches are easier to maintain, because touching less code means the patch is less likely to conflict when upgrading.
If the patch size cannot be significantly reduced, the next thing to try would be to submit these patches upstream. See the chromium contributing guidelines and WebRTC contributing guidelines for how to get started with that.
If you try all the above and do not meet success, the final option is to significantly expand documentation and test coverage for these patches. The goal here would be that if a maintainer has to handle fixing this patch, then the tests should be able to report whether or not the feature is still working as intended, and the maintainer should be able to clearly understand the intention of each part of the patch, in order to be able to correctly resolve conflicts.
Thanks for your patience with this, I know it's a lot of work. Our maintainer team is small and we have to carefully consider the trade-offs of adding patches to the codebase. Every patch adds to the ongoing maintenance burden of keeping Electron up-to-date, and we have to ensure that the project remains sustainable.
|
@adityak368 surely, patching Electron is easier for you, but it is not easier for the maintainers. For context, we currently have 110 patches against Chromium, and if merged this patch would be the 6th-largest patch. Chromium constantly changes, and we regularly have to update our patches to keep pace. The more and larger patches we have, the larger our ongoing maintenance burden. I've outlined several possible paths for moving forward already. The PR adds events which are never tested, nor is calling the method while a capture is occurring. Calling the method from the renderer is not tested either. The documentation this PR adds is pretty thin. There is no example code, it's not documented whether the events are emitted when calling |
Useful to dynamically stop cursor capture in the stream. By default the cursor is captured. First argument is a deviceId so one can stop capturing the cursor for a specific streamed source. #23923 Notes: Can enable or disable capturing cursor while the stream is running
…t violated. added public api for electron browser process updated patch so that setskipcursor runs in proper threads
fixed linting generated patches using git-export-patches
tests: added basic tests for the set skip cursor api
…kip-cursor events tests: added test of running setskipcursor during sharing content docs: added sample code for setskipcursor. removed event documentation of set-skip-cursor
tests: added more cases when calling setSkipCursor during capture
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@adityak368 |
Description of Change
feat: Implement electron.DesktopCapturer.setSkipCursor
Useful to dynamically stop cursor capture in the stream.
By default the cursor is captured.
First argument is a deviceId so one can stop capturing
the cursor for a specific streamed source.
#23923
This is essentially a cherrypick of the the previous implementation of @CapOM
#25103
Checklist
npm testpassesRelease Notes
Notes: Implemented DesktopCapturer.setSkipCursor API. Useful to dynamically stop cursor capture in the stream.