#How do I exclude my floating UI (Start/Stop buttons) from screen recording in an Electron app?

5 messages · Page 1 of 1 (latest)

marble quail
#

I’m building a Loom-style desktop screen recorder with ElectronJS. I show a floating overlay window (like Loom's control buttons), but I want to record the entire screen without including that UI overlay in the video.

I tried using desktopCapturer + MediaRecorder, but Electron captures all visible windows, including my control overlay.

🔍 How does Loom avoid recording its own overlay even when recording fullscreen? Is it using native APIs like DXGI or AVFoundation to exclude its own window by handle?

✅ What I need:

Record full screen.

Show floating controls (always-on-top Electron window).

Ensure the floating control window is NOT included in the recording.

❓What’s the best approach to do this in Electron? Native module? Node C++ addon? Any existing libraries or tips?

stray oriole
#

this makes it so macOS won’t capture the window. may have other quirks tho.

marble quail
#

@stray oriole It works! Thanks a lot for the setContentProtection(true) tip — that saved me! 🙌