AutoAdjust

Service to auto-adjust layout values based on the event type, number of participants, and sharing conditions. Useful for dynamically adjusting UI elements in different event settings.

autoAdjust Dynamically calculates and adjusts layout values (e.g., grid columns) based on conditions such as event type, participant count, and sharing status.

Configuration options for the auto-adjustment.

Number of participants in the event.

Type of event (e.g., 'broadcast', 'chat', 'conference').

Indicates whether screen sharing is active.

Indicates if another resource is currently shared.

A promise resolving to an array of two adjusted layout values.

const [primaryLayout, secondaryLayout] = await autoAdjustService.autoAdjust({
n: 5,
eventType: 'conference',
shareScreenStarted: false,
shared: false,
});
console.log(primaryLayout, secondaryLayout); // Adjusted layout values based on inputs

Constructors

Methods

Constructors

Methods

  • Adjusts values based on the provided options.

    Parameters

    Returns Promise<number[]>

    A promise that resolves to an array containing the adjusted values.