From 8c36179d35f6353270a761dbdc8161ca94ff54a2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 29 Aug 2014 18:11:20 +0100 Subject: [PATCH] Give basic feedback on the state of VoIP calls in the UI (manually adding to master having added to develop) --- webclient/components/matrix/matrix-call.js | 3 ++- webclient/room/room-controller.js | 2 -- webclient/room/room.html | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webclient/components/matrix/matrix-call.js b/webclient/components/matrix/matrix-call.js index 45d00ee79..a66c87906 100644 --- a/webclient/components/matrix/matrix-call.js +++ b/webclient/components/matrix/matrix-call.js @@ -36,7 +36,7 @@ var forAllTracksOnStream = function(s, f) { } angular.module('MatrixCall', []) -.factory('MatrixCall', ['matrixService', 'matrixPhoneService', function MatrixCallFactory(matrixService, matrixPhoneService) { +.factory('MatrixCall', ['matrixService', 'matrixPhoneService', '$rootScope', function MatrixCallFactory(matrixService, matrixPhoneService, $rootScope) { var MatrixCall = function(room_id) { this.room_id = room_id; this.call_id = "c" + new Date().getTime(); @@ -204,6 +204,7 @@ angular.module('MatrixCall', []) // ideally we'd consider the call to be connected when we get media but chrome doesn't implement nay of the 'onstarted' events yet if (this.peerConn.iceConnectionState == 'completed' || this.peerConn.iceConnectionState == 'connected') { this.state = 'connected'; + $rootScope.$apply(); } }; diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index 09dac85d2..ca0d0bae7 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -487,7 +487,5 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) } $scope.onCallHangup = function() { - $scope.feedback = "Call ended"; - $scope.currentCall = undefined; } }]); diff --git a/webclient/room/room.html b/webclient/room/room.html index a3514c3a9..262b5df82 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -105,6 +105,10 @@ + Calling... + Call Connecting... + Call Connected + Call Ended {{ currentCall.state }}