Handles the successful initiation of screen sharing.
This method sets up the necessary transport connections for screen sharing,
updates relevant application states, and notifies participants of the screen
sharing status.
Param: options
The options for the screen sharing success handler.
Param: options.stream
The media stream to be shared.
Param: options.parameters
The parameters required for screen sharing.
Param: options.parameters.socket
The socket instance for real-time communication.
Param: options.parameters.transportCreated
Flag indicating if the transport is already created.
Param: options.parameters.localStreamScreen
The local screen media stream.
Param: options.parameters.screenAlreadyOn
Flag indicating if the screen is already being shared.
Param: options.parameters.screenAction
Flag indicating if the screen share action is requested.
Param: options.parameters.transportCreatedScreen
Flag indicating if the screen transport is created.
Handles the successful initiation of screen sharing.
This method sets up the necessary transport connections for screen sharing, updates relevant application states, and notifies participants of the screen sharing status.
Param: options
The options for the screen sharing success handler.
Param: options.stream
The media stream to be shared.
Param: options.parameters
The parameters required for screen sharing.
Param: options.parameters.socket
The socket instance for real-time communication.
Param: options.parameters.transportCreated
Flag indicating if the transport is already created.
Param: options.parameters.localStreamScreen
The local screen media stream.
Param: options.parameters.screenAlreadyOn
Flag indicating if the screen is already being shared.
Param: options.parameters.screenAction
Flag indicating if the screen share action is requested.
Param: options.parameters.transportCreatedScreen
Flag indicating if the screen transport is created.
Param: options.parameters.hostLabel
The label of the host for this session.
Param: options.parameters.eventType
The type of event (e.g., conference).
Param: options.parameters.showAlert
Optional function to show alert messages.
Param: options.parameters.annotateScreenStream
Flag indicating if screen annotation is enabled.
Param: options.parameters.updateTransportCreatedScreen
Function to update the screen transport creation state.
Param: options.parameters.updateScreenAlreadyOn
Function to update the screen sharing state.
Param: options.parameters.updateScreenAction
Function to update the screen action state.
Param: options.parameters.updateTransportCreated
Function to update the transport creation state.
Param: options.parameters.updateLocalStreamScreen
Function to update the local screen stream.
Param: options.parameters.updateShared
Function to update the shared state.
Param: options.parameters.updateIsScreenboardModalVisible
Function to update the screenboard modal visibility.
Param: options.parameters.sleep
Function to pause execution for a specified time.
Param: options.parameters.createSendTransport
Function to create a send transport for screen sharing.
Param: options.parameters.connectSendTransportScreen
Function to connect the send transport for screen sharing.
Param: options.parameters.disconnectSendTransportScreen
Function to disconnect the send transport for screen sharing.
Param: options.parameters.stopShareScreen
Function to stop the screen sharing process.
Param: options.parameters.reorderStreams
Function to reorder streams based on current state.
Param: options.parameters.prepopulateUserMedia
Function to prepopulate user media based on current settings.
Param: options.parameters.rePort
Function to reinitialize ports if needed.
Returns
A promise that resolves when the screen sharing setup is complete.
Throws
Throws an error if there is an issue during the screen sharing setup.
Example