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.
true
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); Copy
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);
Checks if the recording can be paused based on the current pause count and the allowed pause limits.
Param: options
The options for checking the pause state.
Param: options.recordingMediaOptions
The type of media being recorded ("video" or "audio").
Param: options.recordingVideoPausesLimit
The maximum number of pauses allowed for video recordings.
Param: options.recordingAudioPausesLimit
The maximum number of pauses allowed for audio recordings.
Param: options.pauseRecordCount
The current count of pauses that have been made.
Param: options.showAlert
A function to show an alert message if the pause limit is reached.
Returns
A promise that resolves to
true
if the recording can be paused, otherwisefalse
.Example