commit b65dab968e7cfc4d79f23263e62568c36d354ae0 parent ca9a5566af04acf0d32a4802def98b7de7bfc39e Author: RobinLinus <robinlinus@users.noreply.github.com> Date: Tue, 25 Sep 2018 18:55:47 +0200 Add logging for ICE failed Diffstat:
M | client/scripts/network.js | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/client/scripts/network.js b/client/scripts/network.js @@ -244,7 +244,7 @@ class RTCPeer extends Peer { this._conn = new RTCPeerConnection(RTCPeer.config); this._conn.onicecandidate = e => this._onIceCandidate(e); this._conn.onconnectionstatechange = e => this._onConnectionStateChange(e); - this._conn.oniceconnectionstatechange = e => console.log(e); + this._conn.oniceconnectionstatechange = e => this._onIceConnectionStateChange(e); } _openChannel() { @@ -306,6 +306,10 @@ class RTCPeer extends Peer { } } + _onIceConnectionStateChange(){ + console.log('IceConnectionStateChange',this._conn.iceConnectionState); + } + _onError(error) { console.error(error); }