FS-8088 [verto_communicator] Call conference destroy upon hangup and on event destroy to properly unsub from events.

This commit is contained in:
Joao Mesquita 2015-08-28 19:57:30 -03:00
parent 230e636332
commit b7fa8f3347
1 changed files with 9 additions and 0 deletions

View File

@ -416,6 +416,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
console.log('Has data.liveArray.');
$rootScope.$emit('members.clear');
data.liveArray = null;
} else {
console.log('Doesn\'t found data.liveArray.');
}
@ -502,6 +503,9 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
if (d.params.screenShare) {
cleanShareCall(that);
} else {
if (data.conf) {
data.conf.destroy();
}
cleanCall();
}
break;
@ -690,6 +694,11 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
data.call.hangup();
if (data.conf) {
data.conf.destroy();
data.conf = null;
}
console.debug('The call was hangup.');
if (angular.isFunction(callback)) {