Skip to content

feat: WebRTC broadcast with audio#1

Merged
mohitgauniyal merged 3 commits intomainfrom
feature/webrtc-broadcast
Mar 11, 2026
Merged

feat: WebRTC broadcast with audio#1
mohitgauniyal merged 3 commits intomainfrom
feature/webrtc-broadcast

Conversation

@mohitgauniyal
Copy link
Owner

Replace JPEG-over-socket frame streaming with WebRTC peer connections for smooth, low-latency broadcast.

Changes:

  • WebRTC signalling via existing Socket.IO connection (offer/answer/ICE relay)
  • Broadcaster maintains one peer connection per viewer — mesh architecture, no new infrastructure
  • Google STUN servers for LAN peer discovery — no TURN needed for same-network use
  • Mic captured via getUserMedia and mixed into broadcast stream, muted by default on viewer side
  • Viewer mute/unmute toggle added to panel
  • Capture to channel works via canvas snapshot of live video frame
  • Broadcaster and viewer both clean up correctly on server shutdown or tab close
  • All existing broadcast tests pass unchanged — HTTP endpoints untouched

@mohitgauniyal mohitgauniyal merged commit be98935 into main Mar 11, 2026
2 checks passed
@mohitgauniyal mohitgauniyal deleted the feature/webrtc-broadcast branch March 11, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant