summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-22 10:54:14 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-22 10:55:01 +0100
commit83ea3c96ece5de9e365af40685bc270027a14559 (patch)
treed4a3bccebc4aa376fc643bd64340fd8addd8f9dc /webclient/components
parentFixed unit test; it all actually works. Added a README for running the tests ... (diff)
downloadsynapse-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.js7
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();
         }
     };