From cb52b6e2b4b5d855d2b0b8fcb83b3961ffe784f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joa=CC=83o=20Mesquita?= Date: Wed, 26 Aug 2015 21:48:46 -0300 Subject: [PATCH] FS-7957: [verto_communicator] Make console less chatty by commenting liveArray updates and get initial state of the conference on liveArray boot event. --- .../vertoControllers/controllers/ChatController.js | 6 ++---- .../src/vertoService/services/vertoService.js | 12 +++++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js index c4203e1b07..3b9a50c5e3 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/ChatController.js @@ -82,13 +82,11 @@ } $rootScope.$on('members.boot', function(event, members) { - console.log('members.boot', event, members); $scope.$apply(function() { clearConferenceChat(); for (var idx in members) { var member = members[idx]; addMember(member); - console.log($scope.members); } }) }); @@ -116,8 +114,8 @@ console.log('Didn\'t find the member uuid ' + member.uuid); } else { $scope.$apply(function() { - console.log('Updating', memberIdx, ' <', $scope.members[memberIdx], - '> with <', member, '>'); + // console.log('Updating', memberIdx, ' <', $scope.members[memberIdx], + // '> with <', member, '>'); angular.extend($scope.members[memberIdx], member); }); } diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 25030f6206..c6d9533ccf 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -398,11 +398,21 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora }; data.liveArray.onChange = function(obj, args) { - console.log('liveArray.onChange', obj, args); + // console.log('liveArray.onChange', obj, args); switch (args.action) { case 'bootObj': $rootScope.$emit('members.boot', args.data); + args.data.forEach(function(member){ + var callId = member[0]; + var status = angular.fromJson(member[1][4]); + if (callId === data.call.callID) { + $rootScope.$apply(function(){ + data.mutedMic = status.audio.muted; + data.mutedVideo = status.video.muted; + }); + } + }); break; case 'add': var member = [args.key, args.data];