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
Properties
Property | Modifier | Type | Description |
---|---|---|---|
callback? | public | ReplayCallback | Callback executed once the replay completes. |
timeout? | readonly | number | The current replay timeout in milliseconds, if it has been set. |
Methods
stop()
stop(callback?: ReplayCallback): void;
Immediately stops the active replay.
Parameters
Parameter | Type | Description |
---|---|---|
callback? | ReplayCallback | Optional 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
Parameter | Type | Description |
---|---|---|
timeout | number | Time in milliseconds to wait before stopping the replay. |
callback? | ReplayCallback | Optional callback to set or override the existing complete callback. |
Returns
void