From d2bb5223f2bd40a675cac4def5624f671b888d39 Mon Sep 17 00:00:00 2001
From: Moritz Langenstein <ml5717@ic.ac.uk>
Date: Sat, 12 Oct 2019 17:06:24 +0100
Subject: [PATCH] (ml5717) Use freeice ICE servers

---
 dist/sockets.js | 10 ++++------
 src/sockets.js  |  8 +++-----
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/dist/sockets.js b/dist/sockets.js
index 9bc11d5..01cc3ec 100755
--- a/dist/sockets.js
+++ b/dist/sockets.js
@@ -126,13 +126,11 @@ function signalbuddy(server, config) {
     });
 
     // tell client about stun and turn servers and generate nonces
-    client.emit('stunservers', [{
-      "urls": "stun:stun.l.google.com:19302"
-    }] /*freeice({stunCount: config.stunCount, turnCount: -1}).map(server => {
-       return { urls: server.url }
-       })*/);
+    client.emit('stunservers', (0, _freeice2.default)({ stunCount: config.stunCount, turnCount: -1 }).map(function (server) {
+      return { urls: server.url };
+    }));
 
-    client.emit('turnservers', [] /*freeice({stunCount: -1, turnCount: config.turnCount})*/);
+    client.emit('turnservers', (0, _freeice2.default)({ stunCount: -1, turnCount: config.turnCount }));
   });
 
   function describeRoom(roomName) {
diff --git a/src/sockets.js b/src/sockets.js
index 3974dd3..cbd8263 100755
--- a/src/sockets.js
+++ b/src/sockets.js
@@ -111,13 +111,11 @@ function signalbuddy(server, config) {
     });
 
     // tell client about stun and turn servers and generate nonces
-    client.emit('stunservers', [{
-      "urls": "stun:stun.l.google.com:19302"
-    }]/*freeice({stunCount: config.stunCount, turnCount: -1}).map(server => {
+    client.emit('stunservers', freeice({stunCount: config.stunCount, turnCount: -1}).map(server => {
       return { urls: server.url }
-    })*/);
+    }));
 
-    client.emit('turnservers', []/*freeice({stunCount: -1, turnCount: config.turnCount})*/);
+    client.emit('turnservers', freeice({stunCount: -1, turnCount: config.turnCount}));
   });
 
   function describeRoom(roomName) {
-- 
GitLab