Class RecordUpdateTimer

Updates the recording timer by calculating the elapsed time since the recording started and formatting it in HH:MM:SS format.

The options object.

The elapsed recording time in seconds.

The timestamp when the recording started.

Callback to update the elapsed recording time.

Callback to update the formatted recording time.

This function calculates the elapsed time since the recording started and formats it into a string in HH:MM:SS format. It updates both the elapsed time in seconds and the formatted time via the provided callback functions.

const options: RecordUpdateTimerOptions = {
recordElapsedTime: 0,
recordStartTime: Date.now(),
updateRecordElapsedTime: (elapsedTime) => { console.log(`Elapsed Time: ${elapsedTime} seconds`); },
updateRecordingProgressTime: (formattedTime) => { console.log(`Formatted Time: ${formattedTime}`); },
};
recordUpdateTimer(options);

Constructors

Methods

Constructors

Methods