pub async fn add_ice_candidate(&self, candidate: RTCIceCandidateInit) -> Result<()> {
        if self.remote_description().await.is_none() {
            return Err(Error::ErrNoRemoteDescription);
        }

        let candidate_value = match candidate.candidate.strip_prefix("candidate:") {
            Some(s) => s,
            None => candidate.candidate.as_str(),
        };

        let ice_candidate = if !candidate_value.is_empty() {
            let candidate: Arc<dyn Candidate + Send + Sync> =
                Arc::new(unmarshal_candidate(candidate_value).await?);

            Some(RTCIceCandidate::from(&candidate))
        } else {
            None
        };

        self.internal
            .ice_transport
            .add_remote_candidate(ice_candidate)
            .await
    }
/// add_ice_candidate accepts an ICE candidate string and adds it
/// to the existing set of candidates.
add_ice_candidate accepts an ICE candidate string and adds it
to the existing set of candidates.
add_ice_candidate accepts an ICE candidate string and adds it to the existing set of candidates .
pub async fn add_ice_candidate(&self, candidate: RTCIceCandidateInit) -> Result<()> {
        if self.remote_description().await.is_none() {
            return Err(Error::ErrNoRemoteDescription);
        }
        let candidate_value = match candidate.candidate.strip_prefix("candidate:") {
            Some(s) => s,
            None => candidate.candidate.as_str(),
        };
        let ice_candidate = if !candidate_value.is_empty() {
            let candidate: Arc<dyn Candidate + Send + Sync> =
                Arc::new(unmarshal_candidate(candidate_value).await?);
            Some(RTCIceCandidate::from(&candidate))
        } else {
            None
        };
        self.internal
            .ice_transport
            .add_remote_candidate(ice_candidate)
            .await
    }
pub async fn add_ice_candidate ( & self , candidate : RTCIceCandidateInit ) -> Result < ( ) > { if self . remote_description ( ) . await . is_none ( ) { return Err ( Error :: ErrNoRemoteDescription ) ; } let candidate_value = match candidate . candidate . strip_prefix ( " " ) { Some ( s ) => s , None => candidate . candidate . as_str ( ) , } ; let ice_candidate = if ! candidate_value . is_empty ( ) { let candidate : Arc < dyn Candidate + Send + Sync > = Arc :: new ( unmarshal_candidate ( candidate_value ) . await ? ) ; Some ( RTCIceCandidate :: from ( & candidate ) ) } else { None } ; self . internal . ice_transport . add_remote_candidate ( ice_candidate ) . await }
add_ice_candidate accepts an ICE candidate string and adds it
to the existing set of candidates.
add_ice_candidate accepts an ICE candidate string and adds it to the existing set of candidates .
&self
candidate
RTCIceCandidateInit