Class RecordPauseTimer

Controls the pause and resume functionality of a recording timer.

The options for controlling the timer.

Indicates whether to stop the timer.

Indicates if the timer is currently running.

Indicates if the timer can be paused or resumed.

Optional function to show an alert message.

  • Returns true if the timer can be paused or resumed, otherwise false.

Will show an alert message if:

  • The timer cannot be stopped, paused, or resumed due to not meeting the required time condition.
const options: RecordPauseTimerOptions = {
stop: false,
isTimerRunning: true,
canPauseResume: true,
showAlert: (alert) => { },
};
const canPause = recordPauseTimer(options);
if (canPause) {
// proceed with pausing or resuming the recording
}

Constructors

Methods

Constructors

Methods