Don't try setting up the call if the user has canceled it before allowing permission.

This commit is contained in:
David Baker 2014-09-09 17:58:26 +01:00
parent 25e96f82db
commit ccfb42e4ff

View File

@ -117,6 +117,8 @@ angular.module('MatrixCall', [])
};
MatrixCall.prototype.gotUserMediaForInvite = function(stream) {
if (!$rootScope.currentCall || $rootScope.currentCall.state == 'ended') return;
this.localAVStream = stream;
var audioTracks = stream.getAudioTracks();
for (var i = 0; i < audioTracks.length; i++) {
@ -140,6 +142,8 @@ angular.module('MatrixCall', [])
};
MatrixCall.prototype.gotUserMediaForAnswer = function(stream) {
if (!$rootScope.currentCall || $rootScope.currentCall.state == 'ended') return;
this.localAVStream = stream;
var audioTracks = stream.getAudioTracks();
for (var i = 0; i < audioTracks.length; i++) {