Triggers an update to the screen client based on the provided parameters.

This function handles various conditions to determine the main screen person, adjusts the screen states, and emits an update to the screen client via socket.

The options for triggering the update.

Reference to the active names.

The parameters for the trigger.

A promise that resolves when the trigger is complete.

Will throw an error if the updateScreenClient operation fails.

await trigger({
ref_ActiveNames: ["user1", "user2"],
parameters: {
socket: socketInstance,
localSocket: socketInstance,
roomName: "room1",
screenStates: [{ mainScreenPerson: "user1", mainScreenFilled: true, adminOnMainScreen: false }],
participants: [{ name: "admin", islevel: "2" }],
updateDateState: 0,
lastUpdate: null,
nForReadjust: 0,
eventType: "conference",
shared: false,
shareScreenStarted: false,
whiteboardStarted: false,
whiteboardEnded: false,
updateUpdateDateState: (date) => {},
updateLastUpdate: (date) => {},
updateNForReadjust: (n) => {},
autoAdjust: async ({ n, parameters }) => [n, 0],
},
});

Constructors

Methods

Constructors

Methods

  • Triggers an update to the screen client based on the provided parameters.

    Parameters

    Returns Promise<void>

    A promise that resolves when the trigger is complete.

    Will throw an error if the updateScreenClient operation fails.

    This function handles various conditions to determine the main screen person, adjusts the screen states, and emits an update to the screen client via socket.

    await trigger({
    ref_ActiveNames: ["user1", "user2"],
    parameters: {
    socket: socketInstance,
    localSocket: socketInstance,
    roomName: "room1",
    screenStates: [{ mainScreenPerson: "user1", mainScreenFilled: true, adminOnMainScreen: false }],
    participants: [{ name: "admin", islevel: "2" }],
    updateDateState: 0,
    lastUpdate: null,
    nForReadjust: 0,
    eventType: "conference",
    shared: false,
    shareScreenStarted: false,
    whiteboardStarted: false,
    whiteboardEnded: false,
    updateUpdateDateState: (date) => {},
    updateLastUpdate: (date) => {},
    updateNForReadjust: (n) => {},
    autoAdjust: async ({ n, parameters }) => [n, 0],
    },
    });