interfaceextends SharedCaptureOptions
StreamingOptions
typescript
interface StreamingOptions extends SharedCaptureOptionsProperties
| Name | Type | Description |
|---|---|---|
captureRegion? | Region | Capture only a specific region of the screen. When set, uses screen.grabRegion() instead of screen.grab(). |
ffmpegCloseTimeoutMs? | number | Maximum 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? | number | Frames per second (default: 30) |
height? | number | Frame height - uses first frame's height if not specified |
onError? | (error: unknown) => void | Called when an error occurs during frame capture. |
outputPath | string | Output 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? | boolean | Whether to draw cursor on the recording (default: true) |
width? | number | Frame width - uses first frame's width if not specified |
Was this page helpful?