Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support exclude from capture on Windows (#24274)
* feat: support exclude from capture on Windows Check for WDA_EXCLUDEFROMCAPTURE support, and fallback to WDA_MONITOR. Windows versions that support exclude from capture will exclude the window entirely when `setContentProtection` is enabled similar to how Mac behaves. Fall back to `WDA_MONITOR` for windows verisions that do not support. This flag is mentioned at the very end of a Microsoft blog post here: https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/ Use WDA_EXCLUDEFROMCAPTURE for content protection on windows Starting with Windows 10, version 2004 this will exclude a window similar to the expected behavior on mac. It is safe to use WDA_EXCLUDEFROMCAPTURE on older Windows versions, as it will still behave as if WDA_MONITOR is applied. microsoft/Windows.UI.Composition-Win32-Samples#64 (comment) See the docs here: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity * docs: update setContentProtection docs Update `setContentProtection` docs with `WDA_EXCLUDEFROMCAPTURE` info. This is to support screen capture fully excluding a particular window instead of showing it as a black screen.
- Loading branch information