UNPKG

mediasfu-reactnative-expo

Version:

mediasfu-reactnative-expo – Expo-managed React Native WebRTC SDK for video conferencing, webinars, live streaming, broadcast, screen sharing, whiteboard, chat, recording, live subtitles, translation, and AI agent rooms on iOS, Android, and web. Prebuilt r

38 lines 1.42 kB
import { handleVotePoll as sharedHandleVotePoll } from 'mediasfu-shared'; /** * Handles the voting process for a poll. * * @param {HandleVotePollOptions} options - The options for handling the vote. * @param {string} options.pollId - The ID of the poll. * @param {number} options.optionIndex - The index of the selected option. * @param {Socket} options.socket - The socket instance for communication. * @param {Function} [options.showAlert] - Optional function to show alerts. * @param {string} options.member - The member who is voting. * @param {string} options.roomName - The name of the room where the poll is conducted. * @param {Function} options.updateIsPollModalVisible - Function to update the visibility of the poll modal. * * @example * ```typescript * handleVotePoll({ * pollId: "poll123", * optionIndex: 1, * socket: socketInstance, * showAlert: (message) => console.log(message), * member: "user1", * roomName: "roomA", * updateIsPollModalVisible: (isVisible) => setIsPollModalVisible(isVisible), * }); * ``` */ export const handleVotePoll = async ({ pollId, optionIndex, socket, showAlert, member, roomName, updateIsPollModalVisible, }) => { await sharedHandleVotePoll({ pollId, optionIndex, socket, showAlert, member, roomName, updateIsPollModalVisible, }); }; //# sourceMappingURL=handleVotePoll.js.map