Function to update the visibility of the recording modal.
Param: options.parameters.confirmedToRecord
Flag indicating if the user has confirmed to record.
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
Flag indicating if the video is already on.
Param: options.parameters.audioAlreadyOn
Flag indicating if the audio is already on.
Param: options.parameters.recordStarted
Flag indicating if the recording has started.
Param: options.parameters.recordPaused
Flag indicating if the recording is paused.
Param: options.parameters.recordResumed
Flag indicating if the recording is resumed.
Param: options.parameters.recordStopped
Flag indicating if the recording is stopped.
Param: options.parameters.startReport
Flag indicating if the start report is active.
Param: options.parameters.endReport
Flag indicating if the end report is active.
Param: options.parameters.canRecord
Flag indicating if recording is allowed.
Param: options.parameters.updateClearedToRecord
Function to update the cleared to record status.
Param: options.parameters.updateRecordStarted
Function to update the record started status.
Param: options.parameters.updateRecordPaused
Function to update the record paused status.
Param: options.parameters.updateRecordResumed
Function to update the record resumed status.
Param: options.parameters.updateStartReport
Function to update the start report status.
Param: options.parameters.updateEndReport
Function to update the end report status.
Param: options.parameters.updateCanRecord
Function to update the can record status.
Param: options.parameters.whiteboardStarted
Flag indicating if the whiteboard has started.
Param: options.parameters.whiteboardEnded
Flag indicating if the whiteboard has ended.
Param: options.parameters.rePort
Function to report the recording status.
Param: options.parameters.captureCanvasStream
Function to capture the canvas stream.
Returns
A promise that resolves to a boolean indicating if the recording attempt was successful, or undefined if not applicable.
Remarks
This method checks various conditions, such as whether the user has confirmed recording and whether audio or video is already on,
before starting the recording. It updates the recording state, manages socket communication, and handles whiteboard functionality if applicable.
Example
constoptions: StartRecordingOptions = { parameters:someParameters }; constresult = awaitstartRecording(options); if (result) { console.log('Recording started successfully.'); } else { console.log('Failed to start recording.'); }
Starts the recording process based on the provided parameters.
Param: options
The options for starting the recording.
Param: options.parameters
The parameters required for starting the recording.
Param: options.parameters.roomName
The name of the room where recording is to be started.
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
Flag indicating if the user has confirmed to record.
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
Flag indicating if the video is already on.
Param: options.parameters.audioAlreadyOn
Flag indicating if the audio is already on.
Param: options.parameters.recordStarted
Flag indicating if the recording has started.
Param: options.parameters.recordPaused
Flag indicating if the recording is paused.
Param: options.parameters.recordResumed
Flag indicating if the recording is resumed.
Param: options.parameters.recordStopped
Flag indicating if the recording is stopped.
Param: options.parameters.startReport
Flag indicating if the start report is active.
Param: options.parameters.endReport
Flag indicating if the end report is active.
Param: options.parameters.canRecord
Flag indicating if recording is allowed.
Param: options.parameters.updateClearedToRecord
Function to update the cleared to record status.
Param: options.parameters.updateRecordStarted
Function to update the record started status.
Param: options.parameters.updateRecordPaused
Function to update the record paused status.
Param: options.parameters.updateRecordResumed
Function to update the record resumed status.
Param: options.parameters.updateStartReport
Function to update the start report status.
Param: options.parameters.updateEndReport
Function to update the end report status.
Param: options.parameters.updateCanRecord
Function to update the can record status.
Param: options.parameters.whiteboardStarted
Flag indicating if the whiteboard has started.
Param: options.parameters.whiteboardEnded
Flag indicating if the whiteboard has ended.
Param: options.parameters.rePort
Function to report the recording status.
Param: options.parameters.captureCanvasStream
Function to capture the canvas stream.
Returns
Remarks
This method checks various conditions, such as whether the user has confirmed recording and whether audio or video is already on, before starting the recording. It updates the recording state, manages socket communication, and handles whiteboard functionality if applicable.
Example