Adjusts the layout parameters based on the provided options.
This method calculates the layout dimensions and updates the main window size based on the current event type,
the number of participants, and whether screen sharing is active. It also manages the state transitions
to ensure that the UI reflects the correct configuration based on user interactions.
Param: options
The options for readjusting the layout.
Param: options.n
The number of participants or elements.
Param: options.state
The current state of the layout.
Param: options.parameters
The parameters for the layout adjustment.
Param: options.parameters.getUpdatedAllParams
Function to get updated parameters.
Param: options.parameters.eventType
The type of event (e.g., "broadcast", "chat", "conference").
Param: options.parameters.shareScreenStarted
Indicates if screen sharing has started.
Param: options.parameters.shared
Indicates if content is being shared.
Param: options.parameters.mainHeightWidth
The main height and width value.
Param: options.parameters.prevMainHeightWidth
The previous main height and width value.
Param: options.parameters.hostLabel
The label for the host.
Param: options.parameters.first_round
Indicates if it is the first round.
Param: options.parameters.lock_screen
Indicates if the screen is locked.
Param: options.parameters.updateMainHeightWidth
Function to update the main height and width.
Param: options.parameters.prepopulateUserMedia
Function to prepopulate user media.
Returns
A promise that resolves when the layout adjustment is complete.
Throws
Throws an error if there is an issue updating the grid sizes.
Adjusts the layout parameters based on the provided options.
This method calculates the layout dimensions and updates the main window size based on the current event type, the number of participants, and whether screen sharing is active. It also manages the state transitions to ensure that the UI reflects the correct configuration based on user interactions.
Param: options
The options for readjusting the layout.
Param: options.n
The number of participants or elements.
Param: options.state
The current state of the layout.
Param: options.parameters
The parameters for the layout adjustment.
Param: options.parameters.getUpdatedAllParams
Function to get updated parameters.
Param: options.parameters.eventType
The type of event (e.g., "broadcast", "chat", "conference").
Param: options.parameters.shareScreenStarted
Indicates if screen sharing has started.
Param: options.parameters.shared
Indicates if content is being shared.
Param: options.parameters.mainHeightWidth
The main height and width value.
Param: options.parameters.prevMainHeightWidth
The previous main height and width value.
Param: options.parameters.hostLabel
The label for the host.
Param: options.parameters.first_round
Indicates if it is the first round.
Param: options.parameters.lock_screen
Indicates if the screen is locked.
Param: options.parameters.updateMainHeightWidth
Function to update the main height and width.
Param: options.parameters.prepopulateUserMedia
Function to prepopulate user media.
Returns
A promise that resolves when the layout adjustment is complete.
Throws
Throws an error if there is an issue updating the grid sizes.
Example