A promise that resolves when the video action has been handled.
Remarks
This function checks the current status of the video and handles the logic for starting or stopping the video stream.
It validates permissions and room settings before allowing the video to be activated or deactivated.
Handles the click event to toggle the participant's video on/off and manages video permission requests.
Param: options
The options for handling the video click event.
Param: options.parameters
The parameters required for the video action.
Param: options.parameters.checkMediaPermission
Indicates if media permission needs to be checked.
Param: options.parameters.hasCameraPermission
Indicates if camera permission has been granted.
Param: options.parameters.videoAlreadyOn
Indicates if the video is currently active.
Param: options.parameters.audioOnlyRoom
Indicates if the current room is audio-only.
Param: options.parameters.recordStarted
Indicates if recording has started.
Param: options.parameters.recordResumed
Indicates if recording has resumed.
Param: options.parameters.recordPaused
Indicates if recording is paused.
Param: options.parameters.recordStopped
Indicates if recording is stopped.
Param: options.parameters.recordingMediaOptions
The media options for recording (e.g., "video", "audio").
Param: options.parameters.islevel
The participant's level.
Param: options.parameters.youAreCoHost
Indicates if the user is a co-host.
Param: options.parameters.adminRestrictSetting
Indicates if there are admin restrictions on video.
Param: options.parameters.videoRequestState
State of the video request.
Param: options.parameters.videoRequestTime
Timestamp of the video request.
Param: options.parameters.member
The participant's name.
Param: options.parameters.socket
The socket connection used for communication.
Param: options.parameters.roomName
The name of the room where the video is being toggled.
Param: options.parameters.userDefaultVideoInputDevice
The default video input device.
Param: options.parameters.currentFacingMode
The current facing mode of the camera.
Param: options.parameters.vidCons
Video constraints for the stream.
Param: options.parameters.frameRate
Desired frame rate for the video.
Param: options.parameters.videoAction
Indicates if a video action is currently taking place.
Param: options.parameters.localStream
The local media stream.
Param: options.parameters.audioSetting
The current audio setting.
Param: options.parameters.videoSetting
The current video setting.
Param: options.parameters.screenshareSetting
The current screenshare setting.
Param: options.parameters.chatSetting
The current chat setting.
Param: options.parameters.updateRequestIntervalSeconds
Interval time for updating request state.
Returns
A promise that resolves when the video action has been handled.
Remarks
This function checks the current status of the video and handles the logic for starting or stopping the video stream. It validates permissions and room settings before allowing the video to be activated or deactivated.
Example