getEstimate

Calculates the optimal grid layout dimensions based on the number of participants and various display parameters.

This function determines the best number of rows and columns for displaying video streams or participants in a grid layout, taking into account:

  • Screen sharing status

  • Event type (conference, broadcast, etc.)

  • Screen orientation (wide vs narrow)

  • Page limits

Return

List of three integers: limit, rows, columns where: - limit: The maximum number of items to display - rows: The optimal number of rows - columns: The optimal number of columns

Example:

 val options = GetEstimateOptions(
n = 10,
parameters = object : GetEstimateParameters {
override val fixedPageLimit = 4
override val screenPageLimit = 12
override val shareScreenStarted = false
override val shared = false
override val eventType = "conference"
override val removeAltGrid = false
override val isWideScreen = true
override val isMediumScreen = false
override val updateRemoveAltGrid = { _: Boolean -> }
override val calculateRowsAndColumns = { opts: CalculateRowsAndColumnsOptions ->
calculateRowsAndColumns(opts)
}
}
)
val result = getEstimate(options) // Returns [12, 3, 4] for example

Parameters

options

The estimation options containing participant count and parameters