Browsers were always answerers — meant two browsers in the same room (no Go peer present) would both wait forever for an offer that no one would send. Now: on presence from another peer, the browser with the smaller peerID (lexicographic) initiates the offer; the other side answers. Tie-break in handleOffer handles the race where both posted presence simultaneously and could double-offer. This makes pure-browser meshes work — phone + laptop in the same room auto-pair without needing a Go peer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
15 KiB
15 KiB