diff --git a/assets/js/components/calls/callWindow.js b/assets/js/components/calls/callWindow.js index 020aa9b4..51c7fca7 100644 --- a/assets/js/components/calls/callWindow.js +++ b/assets/js/components/calls/callWindow.js @@ -29,6 +29,11 @@ ComunicWeb.components.calls.callWindow = { */ open: true, + /** + * @type {Boolean} + */ + stopped: false, + window: {}, streams: {}, @@ -190,7 +195,13 @@ ComunicWeb.components.calls.callWindow = { //Make close button lives call.close = function(){ + + //Avoid to call this several times + if(call.stopped) + return; + call.open = false; + call.stopped = true; callContainer.remove(); //Close sockets connections too