Const// Basic usage with manual assignment
import React, { useState } from 'react';
import { BreakoutRoomsModal } from 'mediasfu-reactnative-expo';
import { io } from 'socket.io-client';
const socket = io('https://your-server.com');
const [showBreakout, setShowBreakout] = useState(false);
const breakoutParams = {
participants: [
{ name: 'John', id: '1', islevel: '0' },
{ name: 'Jane', id: '2', islevel: '0' },
{ name: 'Bob', id: '3', islevel: '0' },
],
breakoutRooms: [[], []], // 2 empty rooms
breakOutRoomStarted: false,
breakOutRoomEnded: false,
currentRoomIndex: null,
canStartBreakout: false,
roomName: 'main-meeting',
socket: socket,
updateBreakoutRooms: (rooms) => console.log('Updated:', rooms),
updateBreakOutRoomStarted: (started) => console.log('Started:', started),
// ... other required parameters
};
return (
<BreakoutRoomsModal
isVisible={showBreakout}
onBreakoutRoomsClose={() => setShowBreakout(false)}
parameters={breakoutParams}
/>
);
BreakoutRoomsModal - Breakout room creation and management interface
BreakoutRoomsModal is a React Native component that provides hosts with controls to create multiple breakout rooms, assign participants to rooms, and manage the breakout session lifecycle (start/stop). Participants can be manually assigned or randomly distributed across rooms.
Key Features:
UI Customization: This component can be replaced via
uiOverrides.breakoutRoomsModalto provide a completely custom breakout room management interface.