AddVideosGrid

Service to manage and update video and audio components on a grid in the user interface. This service helps organize and configure participants and streams into different grid layouts.

addVideosGrid Adds video and audio cards to the main and alternate grids based on the parameters and configuration options provided.

Configuration options for setting up the grid.

Streams or participants to display on the main grid.

Streams or participants to display on the alternate grid.

The number of items to add to the grid.

The number of rows for the main grid.

The number of columns for the main grid.

The actual rows currently displayed.

The number of columns in the last row of the grid.

Whether to remove the alternate grid layout.

Additional parameters for updating the grid, controlling appearance, and handling events.

A promise that resolves once the grid layout is updated.

await addVideosGridService.addVideosGrid({
mainGridStreams: [...],
altGridStreams: [...],
numtoadd: 4,
numRows: 2,
numCols: 2,
actualRows: 2,
lastrowcols: 2,
removeAltGrid: false,
parameters: {
eventType: 'webinar',
updateAddAltGrid: (value) => {},
ref_participants: participantsList,
islevel: '1',
videoAlreadyOn: true,
localStreamVideo: localStream,
keepBackground: true,
virtualStream: virtualStream,
forceFullDisplay: false,
otherGridStreams: otherStreamsArray,
updateOtherGridStreams: (newStreams) => {},
updateMiniCardsGrid: (params) => {},
getUpdatedAllParams: () => ({ /* updated parameters * / }),
},
});

Constructors

Methods

Constructors

Methods