]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7995 [verto_communicator] #resolve upon call recovery, emit an event on $rootScope...
authorJoao Mesquita <jmesquita@indicium.com.ar>
Mon, 24 Aug 2015 16:29:55 +0000 (13:29 -0300)
committerJoao Mesquita <jmesquita@indicium.com.ar>
Mon, 24 Aug 2015 16:29:55 +0000 (13:29 -0300)
html5/verto/verto_communicator/js/controllers.js
html5/verto/verto_communicator/js/verto-service.js

index 9b10bb6434b07ffd58043d948837c7bdcbf918c7..f2f5f0e1b528b947910cdf62c14a77a56dbf5ebf 100644 (file)
@@ -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) {
index 87b93b73f3f9ad5d36d9b704d20929a326c15a95..1a1acfe00483ce51a54a3f618759c9d11e46708c 100644 (file)
@@ -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';