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
67 lines (66 loc) • 2.59 kB
TypeScript
import React from 'react';
import { Socket } from 'socket.io-client';
/**
* Configuration options for the ConfirmHereModal component.
*
* @interface ConfirmHereModalOptions
*
* **Modal Control:**
* @property {boolean} isConfirmHereModalVisible - Controls modal visibility
* @property {() => void} onConfirmHereClose - Callback when modal is closed (after confirmation or timeout)
*
* **Countdown Configuration:**
* @property {number} [countdownDuration=120] - Duration in seconds for user to confirm presence before auto-disconnect
*
* **Session Context:**
* @property {Socket} socket - Primary Socket.io instance for disconnect event emission
* @property {Socket} [localSocket] - Optional local Socket.io instance for additional disconnect notification
* @property {string} roomName - Room identifier for disconnect event
* @property {string} member - Member name/ID to disconnect if no confirmation received
*
* **Customization:**
* @property {string} [backgroundColor='#83c0e9'] - Modal background color
* @property {object} [style] - Additional custom styles for modal container
*
* **Advanced Render Overrides:**
* @property {(options: { defaultContent: JSX.Element; dimensions: { width: number; height: number } }) => JSX.Element} [renderContent] - Custom render function for modal content
* @property {(options: { defaultContainer: JSX.Element; dimensions: { width: number; height: number } }) => React.ReactNode} [renderContainer] - Custom render function for modal container
*/
export interface ConfirmHereModalOptions {
isConfirmHereModalVisible: boolean;
onConfirmHereClose: () => void;
backgroundColor?: string;
isDarkMode?: boolean;
countdownDuration?: number;
socket: Socket;
localSocket?: Socket;
roomName: string;
member: string;
/**
* Optional custom style for the modal container.
*/
style?: object;
/**
* Custom render function for modal content.
*/
renderContent?: (options: {
defaultContent: JSX.Element;
dimensions: {
width: number;
height: number;
};
}) => JSX.Element;
/**
* Custom render function for the modal container.
*/
renderContainer?: (options: {
defaultContainer: JSX.Element;
dimensions: {
width: number;
height: number;
};
}) => React.ReactNode;
}
export type ConfirmHereModalType = (options: ConfirmHereModalOptions) => JSX.Element;
declare const ConfirmHereModal: React.FC<ConfirmHereModalOptions>;
export default ConfirmHereModal;