Skip to content

Commit

Permalink
fix(webrtc): add a configurable list of stun servers to wrtc config
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Ewing committed May 13, 2022
1 parent 38b1b03 commit 2722eee
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,26 @@ export const Config = {
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
},
webrtc: {
iceServers: [
{
urls: 'stun:stun.l.google.com:19302',
},
{
urls: 'stun:stun2.l.google.com:19302',
},
{
urls: 'stun:stun3.l.google.com:19302',
},
{
urls: 'stun:stun4.l.google.com:19302',
},
{
urls: 'stun:stun.services.mozilla.com',
},
{
urls: 'stun:stun.services.mozilla.com',
},
],
constraints: {
audio: true,
video: {
Expand Down
3 changes: 3 additions & 0 deletions libraries/WebRTC/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ export class Call extends Emitter<CallEventListeners> {
offerToReceiveAudio: true,
offerToReceiveVideo: true,
},
config: {
iceServers: Config.webrtc.iceServers,
},
},
)
this.peers[peerId] = peer
Expand Down

0 comments on commit 2722eee

Please sign in to comment.