summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-09 18:21:03 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-09 18:21:03 +0100
commitf90ce04a8318d00df9db70e1b4cae500785a7d44 (patch)
tree6593c3f23655771f46f3612e121ee2550cf12cf2 /webclient/components
parentDon't try setting up the call if the user has canceled it before allowing per... (diff)
downloadsynapse-f90ce04a8318d00df9db70e1b4cae500785a7d44.tar.xz
Hangup call if user denies media access.
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-call.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js
index 16f22fe364..feb113f60d 100644
--- a/webclient/components/matrix/matrix-call.js
+++ b/webclient/components/matrix/matrix-call.js
@@ -114,6 +114,7 @@ angular.module('MatrixCall', [])
         };
         matrixService.sendEvent(this.room_id, 'm.call.hangup', undefined, content).then(this.messageSent, this.messageSendFailed);
         this.state = 'ended';
+        self.onHangup();
     };
 
     MatrixCall.prototype.gotUserMediaForInvite = function(stream) {
@@ -233,6 +234,7 @@ angular.module('MatrixCall', [])
 
     MatrixCall.prototype.getUserMediaFailed = function() {
         this.onError("Couldn't start capturing audio! Is your microphone set up?");
+        this.hangup();
     };
 
     MatrixCall.prototype.onIceConnectionStateChanged = function() {