MediaSFU Angular
    Preparing search index...

    Class HandleVotePoll

    Handles the voting process for a poll.

    The options for handling the vote.

    The ID of the poll.

    The index of the selected option.

    The socket instance for communication.

    Optional function to show alerts.

    The member who is voting.

    The name of the room where the poll is conducted.

    Function to update the visibility of the poll modal.

    A promise that resolves when the vote is handled.

    Will log an error message if there is an issue submitting the vote.

    const handleVotePollService = new HandleVotePoll();
    await handleVotePollService.handleVotePoll({
    pollId: '12345',
    optionIndex: 1,
    socket: socketInstance,
    member: 'user1',
    roomName: 'room1',
    showAlert: ({ message, type }) => {
    console.log(`Alert: ${message} - Type: ${type}`);
    },
    updateIsPollModalVisible: (isVisible) => {
    console.log('Poll modal visibility:', isVisible);
    },
    });
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Handles the voting process for a poll.

      Parameters

      • options: HandleVotePollOptions

        The options for handling the vote.

        • pollId: string
        • optionIndex: number
        • socket: Socket
        • OptionalshowAlert?: ShowAlert
        • member: string
        • roomName: string
        • updateIsPollModalVisible: (isVisible: boolean) => void

      Returns Promise<void>

      A promise that resolves when the vote is handled.

      Will log an error message if there is an issue submitting the vote.