mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-18 00:55:40 +00:00
Add IncludeLoopbackCandidate option
This commit is contained in:
parent
c5886c5b1b
commit
67cd92da6b
3 changed files with 9 additions and 7 deletions
|
|
@ -436,6 +436,7 @@ webrtc:
|
|||
icePorts:
|
||||
min:
|
||||
max:
|
||||
includeLoopbackCandidate: false
|
||||
# 2. select a single port to forward all ICE connections there
|
||||
singlePort:
|
||||
# override ICE candidate IP, see: https://github.com/pion/webrtc/issues/835,
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@ type Webrtc struct {
|
|||
Min uint16
|
||||
Max uint16
|
||||
}
|
||||
IceIpMap string
|
||||
IceLite bool
|
||||
IpFilter []string
|
||||
IpFilterRemote []string
|
||||
SinglePort int
|
||||
LogLevel int
|
||||
IceIpMap string
|
||||
IceLite bool
|
||||
IpFilter []string
|
||||
IpFilterRemote []string
|
||||
IncludeLoopbackCandidate bool
|
||||
SinglePort int
|
||||
LogLevel int
|
||||
}
|
||||
|
||||
type IceServer struct {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ func NewApiFactory(conf config.Webrtc, log *logger.Logger, mod ModApiFun) (api *
|
|||
}
|
||||
customLogger := NewPionLogger(log, conf.LogLevel)
|
||||
s := webrtc.SettingEngine{LoggerFactory: customLogger}
|
||||
s.SetIncludeLoopbackCandidate(true)
|
||||
s.SetIncludeLoopbackCandidate(conf.IncludeLoopbackCandidate)
|
||||
if conf.HasDtlsRole() {
|
||||
log.Info().Msgf("A custom DTLS role [%v]", conf.DtlsRole)
|
||||
err = s.SetAnsweringDTLSRole(webrtc.DTLSRole(conf.DtlsRole))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue