import { useVoiceStore } from '../stores/voice.ts'; import { VoiceControls } from './VoiceControls.tsx'; import { VideoGrid } from './VideoGrid.tsx'; import { AudioRenderers } from './AudioRenderers.tsx'; export function VoicePanel() { const isConnected = useVoiceStore((state) => state.isConnected); const currentRoom = useVoiceStore((state) => state.currentRoom); const currentRoomName = useVoiceStore((state) => state.currentRoomName); const error = useVoiceStore((state) => state.error); const whispers = useVoiceStore((state) => state.whispers); const dismissWhisper = useVoiceStore((state) => state.dismissWhisper); if (!currentRoom) return null; return (
{/* Header */}
┌─┤VOICE├─┐ {currentRoomName || currentRoom} {isConnected ? '● LIVE' : '◐ connecting...'}
{error && (
! {error}
)} {whispers.length > 0 && (
── whispers ──
{whispers.map((w) => (
🔊 {w.fromUsername} {w.message || 'whispered'}
))}
)} {/* Video area — fills remaining space, never scrolls */} {/* Controls */}
); }