fcecb5241c
Replaces the single-PeerConnection architecture with full mesh topology where each participant maintains one PeerConnection per peer, as specified by NIP-AC. WebRtcCallSession: Refactored to a pure PeerConnection wrapper that accepts a shared PeerConnectionFactory. No longer manages media sources, tracks, or camera — those are now shared across all peer sessions. CallController: Manages per-peer sessions via ConcurrentHashMap. Shared resources (PeerConnectionFactory, EglBase, audio/video sources, camera) are initialized once and reused. Each peer gets its own WebRtcCallSession with per-peer ICE candidate routing. Supports callee-to-callee mesh connections with pubkey-based tie-breaking to avoid ofer glare. CallManager: New methods for per-peer offer/answer publishing (publishOfferToPeer, publishAnswerToPeer, beginOffering). Forwards ALL answers to CallController (not just the first). New callbacks onNewPeerInGroupCall and onMidCallOfferReceived for mesh setup. Handles mid-call offers (same call-id) when already in Connecting/Connected state. AccountViewModel: Updated callback wiring to pass peer pubkey with answer events and register new group call callbacks. https://claude.ai/code/session_01J5fJx9YbSBx1BsBMctiAm8