1.6 KiB
1.6 KiB
VoiceChannelLayout Component
Overview
VoiceChannelLayout orchestrates the Discord-inspired voice channel module:
- ChannelSidebar – wraps connection management (
ConnectionPanel) andStatusDisplayinside a sidebar with channel metadata. - ChannelHeader – displays channel title/topic and view state pills.
- ParticipantsGrid – renders a responsive grid of
Participanttiles. Visual states:is_selfhighlights the current user in accent color.is_speakingglows in the accent-green palette.is_muteddims the avatar and shows a mute badge.
- ControlDock – sticky bottom bar that embeds
CallControlswith the reworked button set.
Props
VoiceChannelProps {
channel_name: String,
channel_topic: String,
participants: Signal<Vec<Participant>>,
peer_id: Signal<String>,
remote_id: Signal<String>,
connected: Signal<bool>,
websocket: Signal<Option<WebSocket>>,
responder_connection: Signal<Option<RtcPeerConnection>>,
initiator_connection: Signal<Option<RtcPeerConnection>>,
local_media: Signal<Option<MediaStream>>,
}
Layout Notes
- Top-level grid maps to Discord style: sidebar (320px) + stage + control dock.
- Mobile breakpoint hides sidebar; channel content becomes full width.
- Partial data (mock participants) lives in
main.rsuntil real presence sync exists.
Next Steps
- Replace mock participant Signal with data from signaling server (rooms/memberships).
- Animate speaking indicator using audio levels from
MediaStreamTrack. - Add quick actions (invite, copy link) to channel header action pills.