Skip to content

Commit 4e36f86

Browse files
author
Oto Dusek
committed
Use ICE role to set DTLS role in answer
1 parent 7bf1438 commit 4e36f86

File tree

1 file changed

+3
-0
lines changed
  • webrtc/src/peer_connection

1 file changed

+3
-0
lines changed

webrtc/src/peer_connection/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,9 @@ impl RTCPeerConnection {
926926
.to_connection_role();
927927
if connection_role == ConnectionRole::Unspecified {
928928
connection_role = DEFAULT_DTLS_ROLE_ANSWER.to_connection_role();
929+
if remote_is_lite && !self.internal.setting_engine.candidates.ice_lite {
930+
connection_role = DTLSRole::Server.to_connection_role();
931+
}
929932
}
930933

931934
let local_transceivers = self.get_transceivers().await;

0 commit comments

Comments
 (0)