Function to update the visibility of the recording modal.
Param: options.parameters.confirmedToRecord
Indicates if the user has confirmed to start recording.
Param: options.parameters.showAlert
Function to show alerts.
Param: options.parameters.recordingMediaOptions
The media options for recording (e.g., "video", "audio").
Param: options.parameters.videoAlreadyOn
Indicates if the video is already turned on.
Param: options.parameters.audioAlreadyOn
Indicates if the audio is already turned on.
Param: options.parameters.recordStarted
Indicates if the recording has started.
Param: options.parameters.recordPaused
Indicates if the recording is paused.
Param: options.parameters.recordResumed
Indicates if the recording has resumed.
Param: options.parameters.recordStopped
Indicates if the recording has stopped.
Param: options.parameters.recordChangeSeconds
The interval in seconds for changing the recording state.
Param: options.parameters.pauseRecordCount
The count of pauses during the recording.
Param: options.parameters.startReport
Indicates if the start report is active.
Param: options.parameters.endReport
Indicates if the end report is active.
Param: options.parameters.canRecord
Indicates if recording is allowed.
Param: options.parameters.canPauseResume
Indicates if pausing and resuming the recording is allowed.
Param: options.parameters.updateCanPauseResume
Function to update the pause/resume state.
Param: options.parameters.updatePauseRecordCount
Function to update the pause record count.
Param: options.parameters.updateClearedToRecord
Function to update the cleared-to-record state.
Param: options.parameters.updateRecordPaused
Function to update the record paused state.
Param: options.parameters.updateRecordResumed
Function to update the record resumed state.
Param: options.parameters.updateStartReport
Function to update the start report state.
Param: options.parameters.updateEndReport
Function to update the end report state.
Param: options.parameters.updateCanRecord
Function to update the can record state.
Param: options.parameters.rePort
Function to handle reporting.
Returns
A promise that resolves when the recording state has been updated.
Remarks
This method handles the recording state updates, including starting, pausing, resuming, and stopping the recording.
It also performs necessary checks to ensure that the user can perform the requested actions based on their current state.
Alerts are displayed for any issues encountered during the process.
Updates the recording state based on the provided parameters.
Param: options
The options for updating the recording state.
Param: options.parameters
The parameters required for updating the recording state.
Param: options.parameters.roomName
The name of the room where the recording is taking place.
Param: options.parameters.userRecordingParams
User-specific recording parameters.
Param: options.parameters.socket
The socket instance for communication.
Param: options.parameters.localSocket
The local socket instance for communication.
Param: options.parameters.updateIsRecordingModalVisible
Function to update the visibility of the recording modal.
Param: options.parameters.confirmedToRecord
Indicates if the user has confirmed to start recording.
Param: options.parameters.showAlert
Function to show alerts.
Param: options.parameters.recordingMediaOptions
The media options for recording (e.g., "video", "audio").
Param: options.parameters.videoAlreadyOn
Indicates if the video is already turned on.
Param: options.parameters.audioAlreadyOn
Indicates if the audio is already turned on.
Param: options.parameters.recordStarted
Indicates if the recording has started.
Param: options.parameters.recordPaused
Indicates if the recording is paused.
Param: options.parameters.recordResumed
Indicates if the recording has resumed.
Param: options.parameters.recordStopped
Indicates if the recording has stopped.
Param: options.parameters.recordChangeSeconds
The interval in seconds for changing the recording state.
Param: options.parameters.pauseRecordCount
The count of pauses during the recording.
Param: options.parameters.startReport
Indicates if the start report is active.
Param: options.parameters.endReport
Indicates if the end report is active.
Param: options.parameters.canRecord
Indicates if recording is allowed.
Param: options.parameters.canPauseResume
Indicates if pausing and resuming the recording is allowed.
Param: options.parameters.updateCanPauseResume
Function to update the pause/resume state.
Param: options.parameters.updatePauseRecordCount
Function to update the pause record count.
Param: options.parameters.updateClearedToRecord
Function to update the cleared-to-record state.
Param: options.parameters.updateRecordPaused
Function to update the record paused state.
Param: options.parameters.updateRecordResumed
Function to update the record resumed state.
Param: options.parameters.updateStartReport
Function to update the start report state.
Param: options.parameters.updateEndReport
Function to update the end report state.
Param: options.parameters.updateCanRecord
Function to update the can record state.
Param: options.parameters.rePort
Function to handle reporting.
Returns
A promise that resolves when the recording state has been updated.
Remarks
This method handles the recording state updates, including starting, pausing, resuming, and stopping the recording. It also performs necessary checks to ensure that the user can perform the requested actions based on their current state. Alerts are displayed for any issues encountered during the process.
Example