提交 f01c8574 authored 作者: Joao Mesquita's avatar Joao Mesquita

FS-7995 [verto_communicator] #resolve upon call recovery, emit an event on…

FS-7995 [verto_communicator] #resolve upon call recovery, emit an event on $rootScope so that controllers are able to properly clear states.Right now clearing chat state.
上级 51a3ec7c
......@@ -507,6 +507,11 @@ vertoControllers.controller('ChatController', ['$scope', '$rootScope', '$http',
});
});
$rootScope.$on('call.recovering', function(event){
console.log('Our current call is recovering, clear the participant list.');
$scope.members = [];
});
function findMemberByUUID(uuid) {
var found = false;
for (var idx in $scope.members) {
......
......@@ -170,6 +170,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
$rootScope.$emit('call.incoming', number);
}
function recoveringCall() {
$rootScope.$emit('call.recovering');
}
function getVideoParams() {
var maxWidth, maxHeight;
......@@ -500,6 +504,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
data.callState = 'active';
calling();
break;
case "recovering":
console.debug('We are recovering a call!');
recoveringCall();
break;
case "active":
console.debug('Talking to:', d.cidString());
data.callState = 'active';
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论