Class CheckPauseState

Checks if the recording can be paused based on the current pause count and the allowed pause limits.

The options for checking the pause state.

The type of media being recorded ("video" or "audio").

The maximum number of pauses allowed for video recordings.

The maximum number of pauses allowed for audio recordings.

The current count of pauses that have been made.

A function to show an alert message if the pause limit is reached.

A promise that resolves to true if the recording can be paused, otherwise false.

const checkPauseStateService = new CheckPauseState();
const canPause = await checkPauseStateService.checkPauseState({
recordingMediaOptions: 'video',
recordingVideoPausesLimit: 3,
recordingAudioPausesLimit: 5,
pauseRecordCount: 2,
showAlert: (alert) => console.log(alert.message),
});
console.log('Can pause recording:', canPause);

Constructors

Methods

Constructors

Methods

MMNEPVFCICPMFPCPTTAAATR