Hangup call if user denies media access.

pull/4/merge
David Baker 11 years ago
parent ccfb42e4ff
commit f90ce04a83
  1. 8
      webclient/app-controller.js
  2. 2
      webclient/components/matrix/matrix-call.js

@ -142,14 +142,6 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
$scope.hangupCall = function() {
$rootScope.currentCall.hangup();
$timeout(function() {
var icon = angular.element('#callEndedIcon');
$animate.addClass(icon, 'callIconRotate');
$timeout(function(){
$rootScope.currentCall = undefined;
}, 4070);
}, 100);
};
$rootScope.onCallError = function(errStr) {

@ -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() {

Loading…
Cancel
Save