diff --git a/Cargo.toml b/Cargo.toml index a0a3f51..7fdbb61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,3 +13,4 @@ serde_json = "1.0.125" tokio = { version = "1.39.2", features = ["net", "rt", "sync"] } tokio-tungstenite = "0.23.1" tracing = "0.1.40" +webrtc = "0.11.0" diff --git a/src/lib.rs b/src/lib.rs index cd99056..a72c20a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,12 +14,13 @@ use tokio_tungstenite::{connect_async, tungstenite::Message, MaybeTlsStream, Web use tokio_tungstenite::tungstenite::error::Error as tungstenite_error; use tracing::field::debug; use tracing::{error, info, instrument}; +use webrtc::peer_connection::sdp::session_description::RTCSessionDescription; static MAX_MESSAGE: usize = 50; #[derive(Serialize, Deserialize)] pub enum ApplicationMessage { - WebRTCPacket(String), + WebRTCPacket(RTCSessionDescription), } @@ -182,7 +183,6 @@ async fn listen_to_ws( } is_closed.store(true, std::sync::atomic::Ordering::SeqCst); - }