|
@ -315,14 +315,13 @@ func run() { |
|
|
rtc.s.SetEphemeralUDPPortRange(config.PortMin, config.PortMax) |
|
|
rtc.s.SetEphemeralUDPPortRange(config.PortMin, config.PortMax) |
|
|
} |
|
|
} |
|
|
rtc.api = NewAPI(WithMediaEngine(rtc.m), WithSettingEngine(rtc.s)) |
|
|
rtc.api = NewAPI(WithMediaEngine(rtc.m), WithSettingEngine(rtc.s)) |
|
|
peerConnection, err := rtc.api.NewPeerConnection(Configuration{ |
|
|
rtc.PeerConnection, err = rtc.api.NewPeerConnection(Configuration{ |
|
|
// ICEServers: []ICEServer{
|
|
|
// ICEServers: []ICEServer{
|
|
|
// {
|
|
|
// {
|
|
|
// URLs: config.ICEServers,
|
|
|
// URLs: config.ICEServers,
|
|
|
// },
|
|
|
// },
|
|
|
// },
|
|
|
// },
|
|
|
}) |
|
|
}) |
|
|
rtc.PeerConnection = peerConnection |
|
|
|
|
|
rtc.OnICECandidate(func(ice *ICECandidate) { |
|
|
rtc.OnICECandidate(func(ice *ICECandidate) { |
|
|
if ice != nil { |
|
|
if ice != nil { |
|
|
Println(ice.ToJSON().Candidate) |
|
|
Println(ice.ToJSON().Candidate) |
|
|