1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright (c) 2025 Saorsa Labs Limited
//
// This file is part of the Communitas P2P collaboration platform.
//
// Licensed under the GPL-3.0 license
//! WebRTC Integration Module
//!
//! Provides real-time voice, video, and screen sharing capabilities using
//! saorsa-webrtc over the Communitas gossip overlay network.
//!
//! ## Architecture
//!
//! - **SignalingTransport**: Gossip-based signaling using PubSub and Rendezvous
//! - **PeerIdentity**: Four-word addresses as peer identifiers
//! - **Transport**: ant-quic QUIC transport with native NAT traversal
//! - **Media**: RTP-to-QUIC bridge for audio/video/screen share
//!
//! ## Key Components
//!
//! - `GossipSignalingTransport`: Implements WebRTC signaling over gossip
//! - `CommunitasIdentity`: Four-word address wrapper for `PeerIdentity` trait
//! - `WebRtcService`: High-level service for call management
//!
//! ## Usage
//!
//! ```no_run
//! use communitas_core::webrtc::{GossipSignalingTransport, CommunitasIdentity};
//! use saorsa_webrtc::service::WebRtcService;
//!
//! # async fn example() -> anyhow::Result<()> {
//! // Create signaling transport
//! let signaling = GossipSignalingTransport::new(gossip_context)?;
//!
//! // Initialize WebRTC service
//! let webrtc = WebRtcService::<CommunitasIdentity, GossipSignalingTransport>::builder()
//! .with_identity(my_identity)
//! .with_transport(signaling)
//! .build()
//! .await?;
//!
//! // Start the service
//! webrtc.start().await?;
//! # Ok(())
//! # }
//! ```
//!
//! See `docs/architecture/webrtc-multimedia.md` for complete architecture documentation.
// Re-export key types
pub use GossipSignalingTransport;
pub use CommunitasIdentity;
pub use ;
// Re-export saorsa-webrtc types for convenience
pub use ;