Skip to main content

RecordStopEventArgs

Electron APIs / Recorder / RecordStopEventArgs

Provides additional details about a completed recording session, extending RecordEventArgs with more specific metadata related to the stop event.

Example

const onRecordingStopped = (args: RecordStopEventArgs) => {
if (args.hasError) {
console.warn("Recording stopped with error:", args.error);
} else {
console.log(`Recording saved to ${args.filePath}`);
console.log(`Duration: ${args.duration}ms`);
console.log(`Splits: ${args.splitCount}`);
}
};

See

RecordEventArgs

Extends

Properties

PropertyTypeDescription
duration?numberThe total duration of the video in milliseconds, available when the recording ends successfully.
error?stringA descriptive error message if the recording failed to complete successfully. undefined if no error occurred,
filePath?stringThe full file path to the saved video recording. undefined if the recording failed.
hasErrorbooleanIndicates whether the recording ended due to an error. true if an error occurred during recording.
reason?numberThe reason the recording was stopped, either by the user or due to an error. This can be a predefined ErrorCode or a custom numeric value.
splitCount?numberThe number of split segments created during the recording.
startTimeEpoch?numberThe epoch timestamp (in milliseconds) representing when the recording started.
stats?RecorderStatsPerformance and runtime statistics collected during the recording session, such as frame rate, dropped frames, or encoding stats.