Simplify NewWebRTCDialer.

This commit is contained in:
David Fifield 2019-12-24 20:03:11 -07:00
parent 2fb52c8639
commit db1ba4791b

View file

@ -125,13 +125,8 @@ type WebRTCDialer struct {
} }
func NewWebRTCDialer(broker *BrokerChannel, iceServers []webrtc.ICEServer) *WebRTCDialer { func NewWebRTCDialer(broker *BrokerChannel, iceServers []webrtc.ICEServer) *WebRTCDialer {
var config webrtc.Configuration config := webrtc.Configuration{
if iceServers != nil { ICEServers: iceServers,
config = webrtc.Configuration{
ICEServers: iceServers,
}
} else {
config = webrtc.Configuration{}
} }
return &WebRTCDialer{ return &WebRTCDialer{
BrokerChannel: broker, BrokerChannel: broker,