Updates the interaction state based on the provided options and parameters.

This method handles the updating of participant interactions based on the event type, screen sharing status, and various other parameters. It manages the addition and removal of streams in the context of screen sharing and video/audio management.

The options for updating the interaction.

The name of the participant.

Whether to add the participant to the interaction.

Whether to force the update.

The average value used for determining reorder intervals.

The parameters for updating the interaction.

The screen page limit.

The item page limit.

The reorder interval.

The fast reorder interval.

The type of event (e.g., "broadcast", "chat", "conference").

The list of participants.

The list of all video streams.

Indicates if the screen is shared.

Indicates if screen sharing has started.

The admin name stream.

The screen share name stream.

Whether to update the main window.

Whether to sort audio by loudness.

The last reorder time.

The list of new limited streams.

The list of new limited stream IDs.

The list of old sound IDs.

Function to update the main window.

Function to update the audio loudness sorting.

Function to update the last reorder time.

Function to update the new limited streams.

Function to update the new limited stream IDs.

Function to update the old sound IDs.

Function to handle screen changes.

Function to reorder streams.

Function to change videos.

A promise that resolves when the interaction update is complete.

Throws an error if there is an issue during the interaction update.

const options = {
name: 'John Doe',
add: true,
parameters: {
screenPageLimit: 5,
itemPageLimit: 10,
reorderInterval: 1000,
fastReorderInterval: 500,
eventType: 'conference',
participants: [...],
allVideoStreams: [...],
shared: false,
shareScreenStarted: false,
adminNameStream: 'Admin',
screenShareNameStream: 'ScreenShare',
updateMainWindow: true,
sortAudioLoudness: false,
lastReorderTime: Date.now(),
newLimitedStreams: [],
newLimitedStreamsIDs: [],
oldSoundIds: [],
updateUpdateMainWindow: (value) => { console.log(updated) },
updateSortAudioLoudness: (value) => { console.log(updated) },
updateLastReorderTime: (value) => { console.log(updated) },
updateNewLimitedStreams: (streams) => { console.log(updated) },
updateNewLimitedStreamsIDs: (ids) => { console.log(updated) },
updateOldSoundIds: (ids) => { console.log(updated) },
onScreenChanges: async (opts) => { },
reorderStreams: async (opts) => { },
changeVids: async (opts) => { },
},
};

await reUpdateInter(options);

Constructors

Methods

Constructors

Methods