A promise that resolves when the screen share action has been handled.
Remarks
This function checks the current status of screen sharing and handles the logic for starting or stopping screen sharing.
It validates permissions and room settings before allowing screen sharing to be activated or deactivated.
Handles the action for the screen button, including starting and stopping screen sharing.
Param: options
Options for handling the screen button action.
Param: options.parameters
The parameters required for the screen share action.
Param: options.parameters.showAlert
Function to show alert messages.
Param: options.parameters.roomName
The name of the room where the screen share is taking place.
Param: options.parameters.member
The member initiating the screen share.
Param: options.parameters.socket
The socket connection used for communication.
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 restrictions set by the admin.
Param: options.parameters.audioSetting
Current audio setting.
Param: options.parameters.videoSetting
Current video setting.
Param: options.parameters.screenshareSetting
Current screen share setting.
Param: options.parameters.chatSetting
Current chat setting.
Param: options.parameters.screenAction
Indicates if a screen action is currently taking place.
Param: options.parameters.screenAlreadyOn
Indicates if screen sharing is currently active.
Param: options.parameters.screenRequestState
State of the screen share request.
Param: options.parameters.screenRequestTime
Timestamp of when the screen share request was made.
Param: options.parameters.audioOnlyRoom
Indicates if the room is audio-only.
Param: options.parameters.updateRequestIntervalSeconds
Interval time for updating request state.
Param: options.parameters.updateScreenRequestState
Function to update the screen request state.
Param: options.parameters.updateScreenAlreadyOn
Function to update the screen sharing status.
Param: options.parameters.checkPermission
Function to check permissions for screen sharing.
Param: options.parameters.checkScreenShare
Function to check and initiate screen sharing.
Param: options.parameters.stopShareScreen
Function to stop screen sharing.
Returns
A promise that resolves when the screen share action has been handled.
Remarks
This function checks the current status of screen sharing and handles the logic for starting or stopping screen sharing. It validates permissions and room settings before allowing screen sharing to be activated or deactivated.
Example