Version:
interfaceextends SharedCaptureOptions

RecordingOptions

typescript
interface RecordingOptions extends SharedCaptureOptions

Properties

NameTypeDescription
bufferSeconds?numberKeep last N seconds in memory instead of streaming to file.
When stopRecording() is called, the buffer is encoded to the output file.
Maximum 30 seconds. Memory usage depends on resolution and fps —
each frame uses width * height * 4 bytes (e.g. ~8 MB at 1080p).
Default: 30.
captureRegion?RegionCapture only a specific region of the screen.
When set, passes the region to screen.grab(region).
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.
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)
skipMemoryCheck?booleanSkip the buffer memory cap check. Use this when recording high-resolution
screens (e.g. 6K) where you know the system has enough memory.
width?numberFrame width - uses first frame's width if not specified

Was this page helpful?