Always pick the incoming call if we've not yet sent out our invite, otherwise the remorte party will see their call get rejected and our call won't come in until our user clicks allow.

This commit is contained in:
David Baker 2014-09-12 14:06:35 +01:00
parent a81ec21762
commit 8b28f7d14e
2 changed files with 14 additions and 5 deletions

View file

@ -203,6 +203,12 @@ angular.module('MatrixCall', [])
MatrixCall.prototype.gotLocalOffer = function(description) {
console.log("Created offer: "+description);
if (this.state == 'ended') {
console.log("Ignoring newly created offer on call ID "+this.call_id+" because the call has ended");
return;
}
this.peerConn.setLocalDescription(description);
var content = {