From 83ea3c96ece5de9e365af40685bc270027a14559 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 22 Sep 2014 10:54:14 +0100 Subject: Better logging of ICE candidates and fail the call when ICE fails. --- webclient/components/matrix/matrix-call.js | 7 +++++-- webclient/index.html | 13 +++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'webclient') 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(); } }; diff --git a/webclient/index.html b/webclient/index.html index 39174d679d..411c2762d3 100644 --- a/webclient/index.html +++ b/webclient/index.html @@ -69,12 +69,13 @@ Incoming Voice Call Call Connecting... Call Connected - Call Rejected - Call Canceled - User Not Responding - Call Ended - Call Canceled - Call Ended + Media Connection Failed + Call Rejected + Call Canceled + User Not Responding + Call Ended + Call Canceled + Call Ended Waiting for media permission... -- cgit 1.4.1