added non-init ice candidate

This commit is contained in:
Nickiel12 2024-08-24 20:50:12 +00:00
parent fe760a257d
commit 59b0b88c53

View file

@ -15,14 +15,15 @@ use tokio_tungstenite::{connect_async, tungstenite::Message, MaybeTlsStream, Web
use tokio_tungstenite::tungstenite::error::Error as tungstenite_error; use tokio_tungstenite::tungstenite::error::Error as tungstenite_error;
use tracing::{error, info, debug, instrument}; use tracing::{error, info, debug, instrument};
use webrtc::peer_connection::sdp::session_description::RTCSessionDescription; use webrtc::peer_connection::sdp::session_description::RTCSessionDescription;
use webrtc::ice_transport::ice_candidate::RTCIceCandidateInit; use webrtc::ice_transport::ice_candidate::{RTCIceCandidate, RTCIceCandidateInit};
static MAX_MESSAGE: usize = 50; static MAX_MESSAGE: usize = 50;
#[derive(Serialize, Deserialize, Clone)] #[derive(Serialize, Deserialize, Clone)]
pub enum ApplicationMessage { pub enum ApplicationMessage {
WebRTCPacket(RTCSessionDescription), WebRTCPacket(RTCSessionDescription),
WebRTCIceCandidate(RTCIceCandidateInit), WebRTCIceCandidate(RTCIceCandidate),
WebRTCIceCandidateInit(RTCIceCandidateInit),
} }
pub type AppSender = Sender<ApplicationMessage>; pub type AppSender = Sender<ApplicationMessage>;