Skip to content

Commit

Permalink
fix issue with ice servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohan Totting committed Dec 28, 2023
1 parent acd80c5 commit b5c03f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sfu.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ func (s *SFU) createClient(id string, name string, peerConnectionConfig webrtc.C
}

func (s *SFU) NewClient(id, name string, opts ClientOptions) *Client {
peerConnectionConfig := webrtc.Configuration{
ICEServers: s.iceServers,
peerConnectionConfig := webrtc.Configuration{}

if len(s.iceServers) > 0 {
peerConnectionConfig.ICEServers = s.iceServers
}

client := s.createClient(id, name, peerConnectionConfig, opts)
Expand Down

0 comments on commit b5c03f9

Please sign in to comment.