From ab52a58fc54c9a8579524e60b54dc91797b529e2 Mon Sep 17 00:00:00 2001 From: RobinLinus Date: Tue, 25 Sep 2018 18:58:52 +0200 Subject: [PATCH] Add logging for ICE failed --- client/scripts/network.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/scripts/network.js b/client/scripts/network.js index 473a0d8..dfdb305 100644 --- a/client/scripts/network.js +++ b/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) {