interfaceextends SharedCaptureOptions

StreamingOptions

typescript
interface StreamingOptions extends SharedCaptureOptions

Properties

NameTypeDescription
captureRegion?RegionCapture only a specific region of the screen.
When set, uses screen.grabRegion() instead of screen.grab().
ffmpegCloseTimeoutMs?numberMaximum time (ms) to wait for ffmpeg to close during stopStreaming.
If exceeded, ffmpeg is killed with SIGKILL. Default: 30000.
Set to 0 to wait indefinitely (no timeout).
fps?numberFrames per second (default: 30)
height?numberFrame height - uses first frame's height if not specified
onError?(error: unknown) => voidCalled when an error occurs during frame capture.
outputPathstringOutput video path — required, ffmpeg needs it from start.
resolutionMode?"pad-crop" | "drop"How to handle frames whose dimensions differ from the target.
- "drop": skip mismatched frames (default)
- "pad-crop": normalize to target dimensions —
smaller frames are padded with black, larger frames are cropped.
showCursor?booleanWhether to draw cursor on the recording (default: true)
width?numberFrame width - uses first frame's width if not specified

Was this page helpful?