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
Extends
Properties
Property | Type | Description |
---|---|---|
duration? | number | The total duration of the video in milliseconds, available when the recording ends successfully. |
error? | string | A descriptive error message if the recording failed to complete successfully. undefined if no error occurred, |
filePath? | string | The full file path to the saved video recording. undefined if the recording failed. |
hasError | boolean | Indicates whether the recording ended due to an error. true if an error occurred during recording. |
reason? | number | The 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? | number | The number of split segments created during the recording. |
startTimeEpoch? | number | The epoch timestamp (in milliseconds) representing when the recording started. |
stats? | RecorderStats | Performance and runtime statistics collected during the recording session, such as frame rate, dropped frames, or encoding stats. |