Skip to main content

ActiveReplay

Electron APIs / Recorder / ActiveReplay

Manages an ongoing replay capture session. Provides control over stopping the active replay either immediately or after a timeout.

Example

if (recorder.activeReplay) {
recorder.activeReplay.stop((replay) => {
console.log("Replay complete:", replay.filePath);
});
}

See

ReplayCallback

Properties

PropertyModifierTypeDescription
callback?publicReplayCallbackCallback executed once the replay completes.
timeout?readonlynumberThe current replay timeout in milliseconds, if it has been set.

Methods

stop()

stop(callback?: ReplayCallback): void;

Immediately stops the active replay.

Parameters

ParameterTypeDescription
callback?ReplayCallbackOptional callback to set or override the existing complete callback.

Returns

void


stopAfter()

stopAfter(timeout: number, callback?: ReplayCallback): void;

Stops the replay after the given timeout.

Parameters

ParameterTypeDescription
timeoutnumberTime in milliseconds to wait before stopping the replay.
callback?ReplayCallbackOptional callback to set or override the existing complete callback.

Returns

void