diff options
author | David Baker <dbkr@matrix.org> | 2014-09-22 10:54:14 +0100 |
---|---|---|
committer | David Baker <dbkr@matrix.org> | 2014-09-22 10:55:01 +0100 |
commit | 83ea3c96ece5de9e365af40685bc270027a14559 (patch) | |
tree | d4a3bccebc4aa376fc643bd64340fd8addd8f9dc /webclient/components | |
parent | Fixed unit test; it all actually works. Added a README for running the tests ... (diff) | |
download | synapse-83ea3c96ece5de9e365af40685bc270027a14559.tar.xz |
Better logging of ICE candidates and fail the call when ICE fails.
Diffstat (limited to 'webclient/components')
-rw-r--r-- | webclient/components/matrix/matrix-call.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js index a025ccf632..d8571e7036 100644 --- a/webclient/components/matrix/matrix-call.js +++ b/webclient/components/matrix/matrix-call.js @@ -280,14 +280,14 @@ angular.module('MatrixCall', []) }; MatrixCall.prototype.gotLocalIceCandidate = function(event) { - console.log(event); if (event.candidate) { + console.log("Got local ICE "+event.candidate.sdpMid+" candidate: "+event.candidate.candidate); this.sendCandidate(event.candidate); } } MatrixCall.prototype.gotRemoteIceCandidate = function(cand) { - console.log("Got ICE candidate from remote: "+cand); + console.log("Got remote ICE "+cand.sdpMid+" candidate: "+cand.candidate); if (this.state == 'ended') { console.log("Ignoring remote ICE candidate because call has ended"); return; @@ -368,6 +368,9 @@ angular.module('MatrixCall', []) self.state = 'connected'; self.didConnect = true; }); + } else if (this.peerConn.iceConnectionState == 'failed') { + this.hangupReason = 'ice_failed'; + this.hangup(); } }; |