Update pion/webrtc (#346)

Also use DTLSRoleServer in publisher peer connection to get around
potentially a Chrome browser issue in long latency links.
This commit is contained in:
Raja Subramanian
2022-01-18 11:26:57 +05:30
committed by GitHub
parent f662119ca4
commit 0e74ce89c5
3 changed files with 14 additions and 3 deletions
+11
View File
@@ -64,6 +64,17 @@ func NewWebRTCConfig(conf *config.Config, externalIP string) (*WebRTCConfig, err
LoggerFactory: logging.NewLoggerFactory(logger.GetLogger()),
}
s.SetLite(true)
//
// This introduces a half-RTT extra latency in connection setup,
// i. e. if SFU is acting as DTLSRoleClient, it can send the client-hello as soon
// as it is ready. With this change, signalling has to be sent back to the client
// and client has to do client-hello which adds half RTT.
//
// Doing this to address https://github.com/pion/webrtc/issues/2089. This may be
// a Chrome browser issue and can potentially be removed once we understand the source
// of the issue better.
//
s.SetAnsweringDTLSRole(webrtc.DTLSRoleServer)
if externalIP != "" {
s.SetNAT1To1IPs([]string{externalIP}, webrtc.ICECandidateTypeHost)