Explorar o código

Add logging for ICE failed

RobinLinus %!s(int64=6) %!d(string=hai) anos
pai
achega
ab52a58fc5
Modificáronse 1 ficheiros con 8 adicións e 2 borrados
  1. 8 2
      client/scripts/network.js

+ 8 - 2
client/scripts/network.js

@@ -306,8 +306,14 @@ class RTCPeer extends Peer {
         }
         }
     }
     }
 
 
-    _onIceConnectionStateChange(){
-        console.log('IceConnectionStateChange',this._conn.iceConnectionState);
+    _onIceConnectionStateChange() {
+        switch (this._conn.iceConnectionState) {
+            case 'failed':
+                console.error('ICE Gathering failed');
+                break;
+            default:
+                console.log('ICE Gathering', this._conn.iceConnectionState);
+        }
     }
     }
 
 
     _onError(error) {
     _onError(error) {