Class ReorderStreams

Reorders the video streams based on the provided options and updates the UI accordingly.

This method handles the logic for reordering streams in a video conferencing application, managing the addition and arrangement of streams based on various conditions such as participant roles, screen sharing status, and current streams.

The options for reordering streams.

Whether to add new streams or not.

Whether the screen has changed or not.

The parameters required for reordering streams.

Array of all video streams.

Array of participants.

Array of old streams.

ID of the screen.

ID of the admin video.

Array of new limited streams.

Array of new limited stream IDs.

Array of active sounds.

ID of the screen share stream.

Name of the screen share stream.

ID of the admin stream.

Name of the admin stream.

Function to update new limited streams.

Function to update new limited stream IDs.

Function to update active sounds.

Function to update screen share ID stream.

Function to update screen share name stream.

Function to update admin ID stream.

Function to update admin name stream.

Function to update YouYou stream.

Function to reflect changes on the UI.

A promise that resolves when the reordering is complete.

Will throw an error if there is an issue during the reordering process.

await reorderStreams({
add: true,
screenChanged: false,
parameters: {
allVideoStreams: [...],
participants: [...],
oldAllStreams: [...],
newLimitedStreams: [],
newLimitedStreamsIDs: [],
activeSounds: [],
updateNewLimitedStreams: (streams) => { console.log(updated) },
updateNewLimitedStreamsIDs: (ids) => { console.log(updated) },
updateActiveSounds: (sounds) => { console.log(updated) },
changeVids: async (options) => { },
// ...other parameters
},
});

Constructors

Methods

Constructors

Methods