Post content
TelegramMessenger/tgcalls/experimental • eb2bd7d • 7 files, +2173/-155 feat: add InstanceV2CompatImpl for cross-version interop (v14.0.0) New implementation that uses WebRTC PeerConnection internally but speaks V2Impl's signaling protocol (InitialSetupMessage, NegotiateChannelsMessage, CandidatesMessage). Enables bidirectional calls between PeerConnection-based clients and V2Impl clients (versions 7.0.0-13.0.0). Architecture: PeerConnection <-> SignalingTranslator <-> EncryptedConnection <-> SignalingSctpConnection Key components: - SignalingTranslator: converts between cricket::SessionDescription and V2Impl signaling messages using JsepSessionDescription programmatic API (no SDP string round-trips) - Shared conversion functions extracted to Signaling.h/.cpp for use by both ContentNegotiationContext (V2Impl) and SignalingTranslator (CompatImpl) - Data channel works for CompatImpl<->CompatImpl calls; padded as rejected when paired with V2Impl (which has no PeerConnection) 100% success rate at 30% loss in both call directions. Squashed from: - refactor: extract signaling content conversion functions to Signaling.h/.cpp - feat: add SignalingTranslator for V2Impl signaling <-> PeerConnection conversion - feat: add InstanceV2CompatImpl — PeerConnection with V2Impl signaling (version 14.0.0) - feat: add data channel support to InstanceV2CompatImpl TelegramMessenger/tgcalls/experimental • 08cd6d5 • 2 files, +1110/-0 feat: add GroupInstanceReferenceImpl — PeerConnection-based group calls Alternative group call implementation using standard WebRTC PeerConnection instead of the manual ICE/DTLS/SRTP management in GroupInstanceCustomImpl. Implements the same GroupInstanceInterface (~1500 lines vs ~4700). Uses a single PeerConnection to the SFU with: - sendrecv audio transceiver (outgoing audio) - recvonly audio transceivers added dynamically per remote SSRC - data channel for Colibri protocol (ActiveAudioSsrcs discovery) - Programmatic SDP construction via cricket::SessionDescription API Key implementation details: - Loopback ICE enabled (network_ignore_mask=0) for localhost SFU - RTP header extensions copied from local offer per m-line (BUNDLE-safe) - MID extension excluded from remote answer to prevent wrong-channel routing - Renegotiation mirrors local offer mids exactly in constructed answer - Synthetic audio levels (0.1) for known remote SSRCs - Serialized renegotiation (one offer/answer at a time) Squashed from: - feat: add GroupInstanceReferenceImpl — PeerConnection-based group call client - fix: add missing jsep_session_description.h include - fix: enable loopback ICE and add remote candidates - fix: add RTP header extensions to SDP answer - fix: rewrite buildRemoteAnswer to mirror local offer mids for renegotiation - fix: simplify audio level polling to use known remote SSRCs directly #tgcalls