mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 12:09:21 +00:00
Avoid stop loops
This commit is contained in:
parent
5a067001e9
commit
8d613d4e57
@ -29,6 +29,11 @@ ComunicWeb.components.calls.callWindow = {
|
|||||||
*/
|
*/
|
||||||
open: true,
|
open: true,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Boolean}
|
||||||
|
*/
|
||||||
|
stopped: false,
|
||||||
|
|
||||||
window: {},
|
window: {},
|
||||||
streams: {},
|
streams: {},
|
||||||
|
|
||||||
@ -190,7 +195,13 @@ ComunicWeb.components.calls.callWindow = {
|
|||||||
|
|
||||||
//Make close button lives
|
//Make close button lives
|
||||||
call.close = function(){
|
call.close = function(){
|
||||||
|
|
||||||
|
//Avoid to call this several times
|
||||||
|
if(call.stopped)
|
||||||
|
return;
|
||||||
|
|
||||||
call.open = false;
|
call.open = false;
|
||||||
|
call.stopped = true;
|
||||||
callContainer.remove();
|
callContainer.remove();
|
||||||
|
|
||||||
//Close sockets connections too
|
//Close sockets connections too
|
||||||
|
Loading…
Reference in New Issue
Block a user