Skip to content

Commit

Permalink
peer_connection: Add restart_ice()
Browse files Browse the repository at this point in the history
  • Loading branch information
haaspors committed Nov 19, 2024
1 parent 95949fa commit ade0e1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions webrtc/src/peer_connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,14 @@ impl RTCPeerConnection {
}
}

/// restart_ice restart ICE and triggers negotiation needed
/// <https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-restartice>
pub async fn restart_ice(&self) -> Result<()> {
self.internal.ice_transport.restart().await?;
self.internal.trigger_negotiation_needed().await;
Ok(())
}

// set_configuration updates the configuration of this PeerConnection object.
pub async fn set_configuration(&self, configuration: RTCConfiguration) -> Result<()> {
// https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-setconfiguration (step #2)
Expand Down

0 comments on commit ade0e1e

Please sign in to comment.