more minor fixes
authorjordan lavatai <jordanlavatai@gmail.com>
Tue, 4 Jul 2017 23:38:20 +0000 (16:38 -0700)
committerjordan lavatai <jordanlavatai@gmail.com>
Tue, 4 Jul 2017 23:38:20 +0000 (16:38 -0700)
client.js

index 8a4fe43..cb3872f 100644 (file)
--- a/client.js
+++ b/client.js
@@ -85,7 +85,7 @@ function pollServerForAnswer(url, data, resolve, reject) {
 /* Poll server for ice candidates until ice is complete */
 function pollServerForICECandidate(cpc) {
   window.setInterval(() => {
 /* Poll server for ice candidates until ice is complete */
 function pollServerForICECandidate(cpc) {
   window.setInterval(() => {
-    if (cpc.iceGatheringState !== 'complete') {
+    if (cpc.iceGatheringState.localeCompare('complete') === 0) {
       return new Promise((resolve, reject) => {
          console.log('Client: Requesting ICE Candidates from server')
          const request = new XMLHttpRequest()
       return new Promise((resolve, reject) => {
          console.log('Client: Requesting ICE Candidates from server')
          const request = new XMLHttpRequest()