'use strict'; /** * Capture worker: runs in a hidden renderer window and owns all continuous * screen capture during a recording session. * * Per display it opens a desktop media stream (the desktopCapturer source id * comes from the main process) and samples it on a fixed cadence into a * timestamped ring buffer of ImageBitmaps. Sampling and PNG encoding happen * entirely in this process, so the main-process event loop — which must stay * responsive to deliver OS click events on time — never blocks on capture * work. ImageBitmaps are GPU-backed and cheap to create from a