Skip to main content

CaptureReplayOptions

Electron APIs / recorder / CaptureReplayOptions

Options used when capturing a replay segment from the active recording buffer.

Example

const replayOptions: CaptureReplayOptions = {
fileName: "epic-kill",
pastDuration: 10000, // Capture last 10 seconds
timeout: 5000, // Automatically stop after 5 seconds
};
recorder.captureReplay(replayOptions);

Properties

PropertyTypeDescription
fileNamestringReplay file name (without extension). This value will be used to generate the final video file name.
pastDurationnumberThe video length, in milliseconds, to include prior to the time this method is called. This allows capturing moments that happened just before the replay trigger.
timeout?number(Optional) Duration in milliseconds to automatically stop the replay after it starts. - If set to 0, the replay will include only the pastDuration segment (instant clip). - If not set, you must explicitly stop the replay using the ActiveReplay handle.