Function checkScreenShare

  • Checks the current screen sharing status and either stops or requests screen sharing based on the provided parameters.

    Parameters

    Returns Promise<void>

    A promise that resolves when the screen sharing status has been checked and the appropriate action has been taken.

    Will log an error message if an error occurs during the process.

    const options = {
    parameters: {
    shared: false,
    showAlert: showAlertFunction,
    whiteboardStarted: false,
    whiteboardEnded: false,
    breakOutRoomStarted: false,
    breakOutRoomEnded: false,
    stopShareScreen: stopShareScreenFunction,
    requestScreenShare: requestScreenShareFunction,
    },
    };

    checkScreenShare(options)
    .then(() => {
    console.log('Screen share checked successfully');
    })
    .catch((error) => {
    console.error('Error checking screen share:', error);
    });