Remove the local AV stream from ourselves when handing it off to a new call or we'll close it when we hang up.
parent
9819b3619e
commit
a81ec21762
|
@ -330,12 +330,18 @@ angular.module('MatrixCall', [])
|
||||||
};
|
};
|
||||||
|
|
||||||
MatrixCall.prototype.replacedBy = function(newCall) {
|
MatrixCall.prototype.replacedBy = function(newCall) {
|
||||||
|
console.log(this.call_id+" being replaced by "+newCall.call_id);
|
||||||
if (this.state == 'wait_local_media') {
|
if (this.state == 'wait_local_media') {
|
||||||
|
console.log("Telling new call to wait for local media");
|
||||||
newCall.waitForLocalAVStream = true;
|
newCall.waitForLocalAVStream = true;
|
||||||
} else if (this.state == 'create_offer') {
|
} else if (this.state == 'create_offer') {
|
||||||
|
console.log("Handing local stream to new call");
|
||||||
newCall.localAVStream = this.localAVStream;
|
newCall.localAVStream = this.localAVStream;
|
||||||
|
delete(this.localAVStream);
|
||||||
} else if (this.state == 'invite_sent') {
|
} else if (this.state == 'invite_sent') {
|
||||||
|
console.log("Handing local stream to new call");
|
||||||
newCall.localAVStream = this.localAVStream;
|
newCall.localAVStream = this.localAVStream;
|
||||||
|
delete(this.localAVStream);
|
||||||
}
|
}
|
||||||
this.successor = newCall;
|
this.successor = newCall;
|
||||||
this.hangup(true);
|
this.hangup(true);
|
||||||
|
|
Loading…
Reference in New Issue