Feature: Video Chat #23
Labels
No labels
area:api
area:core
area:docs
area:infra
area:ux
dependencies
documentation
duplicate
good first issue
help wanted
invalid
question
rust
status:complete
status:partial
status:planned
type:bug
type:design
type:feature
type:infra
type:refactor
type:research
type:ux
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
icub3d/decentcom#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrated from GitHub issue icub3d/decentcom#23
Original Author: @icub3d
Original Date: 2026-04-15T14:15:50Z
Feature: Video Chat
Overview
Video chat adds camera streams to voice channels, allowing participants to see each other alongside hearing audio. Video is an optional layer on top of voice — joining a voice channel does not require enabling video, and video can be toggled on/off at any time. The server SFU forwards video tracks the same way it forwards audio tracks, selectively routing each participant's camera stream to all others.
Background
The architecture doc (
docs/design/architecture.md) lists video as part of the Media / SFU component. The server-model doc (docs/design/server-model.md) definesvideoas a feature flag (enabled by default, requiresvoice_channelsto also be enabled). Video is an additional media track on the same WebRTC peer connection established for voice — it does not require a separate signaling flow.Depends on:
voice(feature #22), all Phase 1 and Phase 2 features.Requirements
videofeature flag — disabled servers do not allow video tracksDesign
API / Interface Changes
REST endpoints (additions to voice):
/api/v1/voice/{channel_id}/statevideo_enabledfieldWebSocket events (additions):
VOICE_STATE_UPDATEvideo_enabledfieldVOICE_TRACK_ADDEDVOICE_TRACK_REMOVEDTauri IPC commands (additions):
voice_toggle_videoData Model Changes
Extended
voice_states(in-memory):video_enabledNo persistent schema changes. Video state is entirely ephemeral.
Component Changes
Server (
server/):server/src/sfu/session.rs— handle renegotiation when a video track is added/removed to an existing peer connectionserver/src/sfu/router.rs— forward video tracks alongside audio; implement simulcast layer selection based on receiver count or available bandwidthserver/src/routes/voice.rs— extend state endpoint to acceptvideo_enabledserver/src/gateway/events.rs— addVOICE_TRACK_ADDEDandVOICE_TRACK_REMOVEDeventsserver/src/config.rs— addvideofeature flag check (must also havevoice_channelsenabled)Client (
client/):client/src/hooks/useVoice.ts— extend to manage video track: getUserMedia with video constraints, add/remove track on peer connection, handle renegotiationclient/src/components/VoiceControls.tsx— add camera toggle buttonclient/src/components/VideoGrid.tsx— new component: grid layout of participant video streams, adapts layout based on participant count (1=full, 2=split, 3-4=2x2, 5+=scrollable grid)client/src/components/VideoTile.tsx— new component: single participant's video with name overlay and mute indicatorclient/src/stores/voiceStore.ts— extend to track video-enabled state per participant and video MediaStream referencesTask List
Phase A: Server Video Track Handling
video_enabledper participant (VoiceParticipant.video_enabled)videofeature flag check — reject video track addition ifvideois disabled on the serverserver/src/sfu/session.rs(deferred — SFU unresolved)server/src/sfu/router.rsto forward video tracks (deferred)VOICE_TRACK_ADDEDandVOICE_TRACK_REMOVEDgateway eventsPhase B: Client Video Capture and Display
client/src/hooks/useVoice.tsto request camera access viagetUserMedia({ video: true })and add the video track to the peer connectionclient/src/components/VoiceControls.tsxclient/src/components/VideoGrid.tsx— responsive grid layout for video streamsclient/src/components/VideoTile.tsx— individual video element with participant name overlayclient/src/stores/voiceStore.tsto track video-enabled state and remote video MediaStream objectsVOICE_TRACK_ADDED/VOICE_TRACK_REMOVEDevents to attach/detach video streams in the gridTest List
videofeature flag is disabled returns an errorOpen Questions