The WebSocket onmessage handler captured isBroadcasting=false at creation time. When ICE candidates arrived from remote viewers, the handler looked up viewerPcRef instead of peerConnectionsRef, dropping all candidates. Fix: use refs (isBroadcastingRef, viewingRef, handleWsMessageRef) so the WS handler always reads current state. connectWs() now has [] deps and delegates to handleWsMessageRef.current for every message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| index.html | ||
| package.json | ||
| tsconfig.json | ||
| vite.config.ts | ||