Class PrepopulateUserMedia

Prepopulates the user media based on the provided options.

This method prepares the UI components for the user's media based on the event type and participant information. It manages the display of video and audio cards, mini cards, and handles screen sharing scenarios.

The options for prepopulating user media.

The name of the user.

The parameters for prepopulating user media.

Function to get updated parameters.

List of participants.

List of all video streams.

The level of the user.

The member name.

Indicates if the screen is shared.

Indicates if screen sharing has started.

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

The ID of the screen.

Indicates if full display is forced.

Function to update the main window.

Indicates if the main screen is filled.

Indicates if admin is on the main screen.

The person on the main screen.

Indicates if the video is already on.

Indicates if the audio is already on.

List of old all streams.

Function to check orientation.

Indicates if screen force full display is enabled.

The local screen stream.

List of remote screen streams.

The local video stream.

The main height and width.

Indicates if the screen is wide.

Indicates if local UI mode is enabled.

Indicates if whiteboard has started.

Indicates if whiteboard has ended.

The virtual stream.

Indicates if background should be kept.

The annotate screen stream.

Function to update the main screen person.

Function to update if the main screen is filled.

Function to update if admin is on the main screen.

Function to update the main height and width.

Function to update screen force full display.

Function to update the main window update status.

Function to update the main grid stream.

A promise that resolves with the components and inputs or void.

Throws an error if there is an issue preparing and populating the main screen.

const options = {
name: 'John Doe',
parameters: {
getUpdatedAllParams: () => { },
participants: [],
allVideoStreams: [],
islevel: '1',
member: 'John',
shared: false,
shareScreenStarted: false,
eventType: 'conference',
screenId: 'screen123',
forceFullDisplay: false,
updateMainWindow: false,
mainScreenFilled: false,
adminOnMainScreen: false,
mainScreenPerson: '',
videoAlreadyOn: false,
audioAlreadyOn: false,
oldAllStreams: [],
checkOrientation: () => 'landscape',
screenForceFullDisplay: false,
localStreamScreen: null,
remoteScreenStream: [],
localStreamVideo: null,
mainHeightWidth: 100,
isWideScreen: true,
localUIMode: false,
whiteboardStarted: false,
whiteboardEnded: false,
virtualStream: null,
keepBackground: false,
annotateScreenStream: false,
updateMainScreenPerson: (person) => { console.log(updated) },
updateMainScreenFilled: (filled) => { console.log(updated) },
updateAdminOnMainScreen: (admin) => { console.log(updated) },
updateMainHeightWidth: (heightWidth) => { console.log(updated) },
updateScreenForceFullDisplay: (force) => { console.log(updated) },
updateUpdateMainWindow: (update) => { console.log(updated) },
updateMainGridStream: (components) => { console.log(updated) },
},
};

await prepopulateUserMedia(options);

Constructors

Methods

Constructors

Methods

  • Prepopulates the user media based on the provided options.

    Parameters

    Returns Promise<void | {
        component: any;
        inputs: any;
    }[]>

    A promise that resolves with the components and inputs or void.