summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-12 11:51:57 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-12 11:51:57 +0100
commita81ec21762f7c9eb57580b6998474a283df094d7 (patch)
tree5b1240c96d5d8832c7ad027e7fa1c56b784fcb13
parentCSS m.room.topic and m.room.name events in the history (diff)
downloadsynapse-a81ec21762f7c9eb57580b6998474a283df094d7.tar.xz
Remove the local AV stream from ourselves when handing it off to a new call or we'll close it when we hang up.
-rw-r--r--webclient/components/matrix/matrix-call.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js
index 7407c6fd7c..e402e02d33 100644
--- a/webclient/components/matrix/matrix-call.js
+++ b/webclient/components/matrix/matrix-call.js
@@ -330,12 +330,18 @@ angular.module('MatrixCall', [])
     };
 
     MatrixCall.prototype.replacedBy = function(newCall) {
+        console.log(this.call_id+" being replaced by "+newCall.call_id);
         if (this.state == 'wait_local_media') {
+            console.log("Telling new call to wait for local media");
             newCall.waitForLocalAVStream = true;
         } else if (this.state == 'create_offer') {
+            console.log("Handing local stream to new call");
             newCall.localAVStream = this.localAVStream;
+            delete(this.localAVStream);
         } else if (this.state == 'invite_sent') {
+            console.log("Handing local stream to new call");
             newCall.localAVStream = this.localAVStream;
+            delete(this.localAVStream);
         }
         this.successor = newCall;
         this.hangup(true);