summary refs log tree commit diff
path: root/syweb/webclient/app-controller.js
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-11-14 11:16:50 +0000
committerMark Haines <mark.haines@matrix.org>2014-11-14 11:16:50 +0000
commite903c941cb1bed18026f00ed1d3495a8d172f13a (patch)
tree894da7441d913361b70da4cc13cd73ead86d2e67 /syweb/webclient/app-controller.js
parentRemove unused 'context' variables to appease pyflakes (diff)
parentAdd notification-service unit tests. (diff)
downloadsynapse-e903c941cb1bed18026f00ed1d3495a8d172f13a.tar.xz
Merge branch 'develop' into request_logging
Conflicts:
	setup.py
	synapse/storage/_base.py
	synapse/util/async.py
Diffstat (limited to '')
-rw-r--r--syweb/webclient/app-controller.js (renamed from webclient/app-controller.js)20
1 files changed, 7 insertions, 13 deletions
diff --git a/webclient/app-controller.js b/syweb/webclient/app-controller.js

index e4b7cd286f..582c075e3d 100644 --- a/webclient/app-controller.js +++ b/syweb/webclient/app-controller.js
@@ -21,18 +21,12 @@ limitations under the License. 'use strict'; angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'eventStreamService']) -.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', '$animate', 'matrixService', 'mPresence', 'eventStreamService', 'eventHandlerService', 'matrixPhoneService', - function($scope, $location, $rootScope, $timeout, $animate, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService) { +.controller('MatrixWebClientController', ['$scope', '$location', '$rootScope', '$timeout', 'matrixService', 'mPresence', 'eventStreamService', 'eventHandlerService', 'matrixPhoneService', 'modelService', + function($scope, $location, $rootScope, $timeout, matrixService, mPresence, eventStreamService, eventHandlerService, matrixPhoneService, modelService) { // Check current URL to avoid to display the logout button on the login page $scope.location = $location.path(); - // disable nganimate for the local and remote video elements because ngAnimate appears - // to be buggy and leaves animation classes on the video elements causing them to show - // when they should not (their animations are pure CSS3) - $animate.enabled(false, angular.element('#localVideo')); - $animate.enabled(false, angular.element('#remoteVideo')); - // Update the location state when the ng location changed $rootScope.$on('$routeChangeSuccess', function (event, current, previous) { $scope.location = $location.path(); @@ -112,12 +106,12 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even if (!$rootScope.currentCall) { // This causes the still frame to be flushed out of the video elements, // avoiding a flash of the last frame of the previous call when starting the next - angular.element('#localVideo')[0].load(); - angular.element('#remoteVideo')[0].load(); + if (angular.element('#localVideo')[0].load) angular.element('#localVideo')[0].load(); + if (angular.element('#remoteVideo')[0].load) angular.element('#remoteVideo')[0].load(); return; } - var roomMembers = angular.copy($rootScope.events.rooms[$rootScope.currentCall.room_id].members); + var roomMembers = angular.copy(modelService.getRoom($rootScope.currentCall.room_id).current_room_state.members); delete roomMembers[matrixService.config().user_id]; $rootScope.currentCall.user_id = Object.keys(roomMembers)[0]; @@ -187,8 +181,8 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even } call.onError = $scope.onCallError; call.onHangup = $scope.onCallHangup; - call.localVideoElement = angular.element('#localVideo')[0]; - call.remoteVideoElement = angular.element('#remoteVideo')[0]; + call.localVideoSelector = '#localVideo'; + call.remoteVideoSelector = '#remoteVideo'; $rootScope.currentCall = call; });