readjust

suspend fun readjust(options: ReadjustOptions)

Adjusts the layout parameters based on the current state, participant count, and event type.

This function recalculates layout values to determine the main and secondary display areas for participants in a media application. It considers various factors such as whether screen sharing is active, the type of event (e.g., conference, broadcast, chat), and the number of participants. If the layout changes, it triggers a function to prepopulate user media.

Parameters

options

The options containing participant count, state, and parameters

Example:

val readjustParams = object : ReadjustParameters {
override val eventType = EventType.CONFERENCE
override val shareScreenStarted = false
override val shared = false
override val mainHeightWidth = 50.0
override val prevMainHeightWidth = 50.0
override val hostLabel = "HostUser"
override val firstRound = true
override val lockScreen = false
override val updateMainHeightWidth = { width ->
}
override val prepopulateUserMedia = { options ->
}
override fun getUpdatedAllParams() = this
}

readjust(
options = ReadjustOptions(
n = 5,
state = 1,
parameters = readjustParams
)
)