Class RecordResumeTimer

Resumes the recording timer if it is not already running and can be paused/resumed.

The options for resuming the recording timer.

The parameters for the recording timer.

Function to get updated parameters.

Indicates if the timer is currently running.

Indicates if the timer can be paused/resumed.

The elapsed recording time in seconds.

The start time of the recording.

The interval ID for the recording timer.

Function to show an alert message.

Function to update the recording start time.

Function to update the recording timer interval.

Function to update the timer running status.

Function to update the pause/resume status.

  • Returns a promise that resolves to true if the timer was successfully resumed, otherwise false.

Will show an alert if the timer cannot be resumed due to conditions not being met.

const options: RecordResumeTimerOptions = {
parameters: {
isTimerRunning: false,
canPauseResume: true,
recordElapsedTime: 10,
recordStartTime: Date.now(),
recordTimerInterval: null,
showAlert: (alert) => { },
updateRecordStartTime: (time) => { },
updateRecordTimerInterval: (interval) => { },
updateIsTimerRunning: (isRunning) => { },
updateCanPauseResume: (canPause) => { },
getUpdatedAllParams: () => ({ }),
},
};
const canResume = await recordResumeTimer(options);
if (canResume) {
// proceed with the resumed recording
}

Constructors

Methods

Constructors

Methods