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.
Will show an alert message if:
const options: RecordPauseTimerOptions = { stop: false, isTimerRunning: true, canPauseResume: true, showAlert: (alert) => { },};const canPause = recordPauseTimer(options);if (canPause) { // proceed with pausing or resuming the recording} Copy
const options: RecordPauseTimerOptions = { stop: false, isTimerRunning: true, canPauseResume: true, showAlert: (alert) => { },};const canPause = recordPauseTimer(options);if (canPause) { // proceed with pausing or resuming the recording}
Controls the pause and resume functionality of a recording timer.
Param: options
The options for controlling the timer.
Param: options.stop
Indicates whether to stop the timer.
Param: options.isTimerRunning
Indicates if the timer is currently running.
Param: options.canPauseResume
Indicates if the timer can be paused or resumed.
Param: options.showAlert
Optional function to show an alert message.
Returns
Throws
Will show an alert message if:
Example