-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
fix: disable kWindowCaptureMacV2 for desktop capturer #30507
Conversation
f517d38
to
78797cf
Compare
78797cf
to
92b3da9
Compare
Release Notes Persisted
|
I have automatically backported this PR to "13-x-y", please check out #30523 |
I have automatically backported this PR to "14-x-y", please check out #30524 |
I have automatically backported this PR to "15-x-y", please check out #30525 |
is there any settings on linux, my linux electron app screenshot black screen, mac is ok |
Description of Change
Fixes #29458
When trying to screen capture an Electron application's own window, the screen will show as blank. This is because when
kWindowCaptureMacV2
is enabled, the latter portion of the DesktopMediaID is incorrectly replaced. For example: the DesktopMediaID is changed fromwindow:626:0
(correct) towindow:626:626
(incorrect). Passing the incorrect id into the desktop capture API results in the window not being found, and a blank or default-colored screen.kWindowCaptureMacV2
is already disabled by default in upstream Chromium (see here: https://chromium-review.googlesource.com/c/chromium/src/+/3069272). This PR also disables the feature by default until the upstream fix is in main. It also adds a new desktop capture test to keep the issue from happening again.Checklist
npm test
passesRelease Notes
Notes: Fixed an issue on Mac where an application could not capture its own window using the desktop capture or getMediaSourceId APIs.