← Back to SolveWatch

Deep dive · Screenshare invisibility

How the HUD stays invisible — even during full-screen share

Every screen capture tool — Zoom, Google Meet, Microsoft Teams, Loom, OBS — sees a blank space where the SolveWatch overlay sits. Here's the exact mechanism that makes it work, and why it's reliable even during entire screen recording.

The OS API: setContentProtection

SolveWatch calls win.setContentProtection(true) on the Electron BrowserWindow immediately after creation. This maps to:

  • macOS: NSWindow.sharingType = NSWindowSharingNone — the window compositor marks this layer as excluded from all capture streams.
  • Windows: SetWindowDisplayAffinity(WDA_EXCLUDEFROMCAPTURE) — a Win32 API that flags the window as capture-exempt at the HWND level.

These are not heuristics or CSS tricks — they are kernel-level flags that the OS compositor enforces. The capture pipeline (screen recording, screen sharing) reads these flags before compositing frames and omits flagged windows entirely.

Why it works for entire screen share, not just window share

A common misconception is that content protection only blocks window capture (where you pick a specific window). In reality, both NSWindowSharingNone and WDA_EXCLUDEFROMCAPTURE operate on the compositor layer — the step that assembles all visible windows into the final bitmap that capture tools read from.

When you share your entire screen, the screen recording API still asks the compositor for a frame. The compositor produces a frame with the protected window replaced by whatever is behind it (typically your desktop wallpaper or another app). The capture tool never sees the overlay — it receives a frame that was never composed with it.

This is the same mechanism used by: Apple Pay sheets, system passcode dialogs, Netflix in Safari (DRM), and banking apps that prevent screenshot of card numbers.

The Electron code

In electron/main.js, the relevant lines:

const win = new BrowserWindow({
  width: 380,
  height: 460,
  frame: false,
  alwaysOnTop: true,
  level: 'screen-saver',   // above all other windows
  transparent: true,
  // ...
});

win.setContentProtection(true);  // OS-level capture exclusion

The alwaysOnTop: true with level: 'screen-saver' keeps the overlay above system UI. The setContentProtection(true) call makes it invisible to any capture pipeline regardless of capture mode.

Confirmed working on

Zoom (window + full screen)
Google Meet
Microsoft Teams
Loom
OBS Studio
macOS Screenshot
Windows Snipping Tool
Discord Go Live

Limitations

Hardware-level capture bypasses this protection. An external camera pointed at your screen, or a second physical monitor mirrored to a capture card, will show the overlay — because the OS compositor is not involved. For all software-based screen capture (which covers 100% of video interview tools), the protection holds.

Next: Why SolveWatch is fast →The full pipeline →