diff --git a/packages/js/src/Modules/Verto/BrowserSession.ts b/packages/js/src/Modules/Verto/BrowserSession.ts index 5f21efd1..f8c3f417 100644 --- a/packages/js/src/Modules/Verto/BrowserSession.ts +++ b/packages/js/src/Modules/Verto/BrowserSession.ts @@ -612,12 +612,11 @@ export default abstract class BrowserSession extends BaseSession { } set iceServers(servers: RTCIceServer[] | boolean) { + const googleStun = { urls: ['stun:stun.l.google.com:19302'] }; if (typeof servers === 'boolean') { - this._iceServers = servers - ? [{ urls: ['stun:stun.l.google.com:19302'] }] - : []; + this._iceServers = servers ? [googleStun] : []; } else { - this._iceServers = servers || [TURN_SERVER, STUN_SERVER]; + this._iceServers = servers || [TURN_SERVER, STUN_SERVER, googleStun]; } } diff --git a/packages/js/src/Modules/Verto/webrtc/Peer.ts b/packages/js/src/Modules/Verto/webrtc/Peer.ts index caee7cf8..e21654a7 100644 --- a/packages/js/src/Modules/Verto/webrtc/Peer.ts +++ b/packages/js/src/Modules/Verto/webrtc/Peer.ts @@ -137,7 +137,6 @@ export default class Peer { } private handleIceCandidate = (event: RTCPeerConnectionIceEvent) => { - console.log(event.candidate); if (event.candidate && ['relay', 'srflx'].includes(event.candidate.type)) { // Found enough candidates to establish a connection // This is a workaround for the issue where iceGatheringState is always 'gathering' @@ -380,6 +379,7 @@ export default class Peer { const { iceServers = [] } = this.options; const config: RTCConfiguration = { + iceCandidatePoolSize: 255, bundlePolicy: 'max-compat', iceServers, };