summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-17 16:26:35 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-17 16:26:35 +0100
commit1fb2c831e824d89aa849fc2aee45f5f1162842b2 (patch)
tree124f735faff26a592517ce88aa99bcf1f9cd712a /webclient/room
parentTime out calls from both ends properly. (diff)
downloadsynapse-1fb2c831e824d89aa849fc2aee45f5f1162842b2.tar.xz
Video calling (in a tiny box at the moment)
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room-controller.js8
-rw-r--r--webclient/room/room.html1
2 files changed, 7 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index 2c9a3836e7..c8bcf88ff3 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -837,7 +837,9 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
         var call = new MatrixCall($scope.room_id);
         call.onError = $rootScope.onCallError;
         call.onHangup = $rootScope.onCallHangup;
-        call.placeCall({audio: true, video: false});
+        // remote video element is used for playing audio in voice calls
+        call.remoteVideoElement = angular.element('#remoteVideo')[0];
+        call.placeVoiceCall();
         $rootScope.currentCall = call;
     };
 
@@ -845,7 +847,9 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
         var call = new MatrixCall($scope.room_id);
         call.onError = $rootScope.onCallError;
         call.onHangup = $rootScope.onCallHangup;
-        call.placeCall({audio: true, video: true});
+        call.localVideoElement = angular.element('#localVideo')[0];
+        call.remoteVideoElement = angular.element('#remoteVideo')[0];
+        call.placeVideoCall();
         $rootScope.currentCall = call;
     };
 
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 9d617eadd8..94077576a2 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -173,6 +173,7 @@
                 </span>
                 <button ng-click="leaveRoom()" ng-disabled="state.permission_denied">Leave</button>
                 <button ng-click="startVoiceCall()" ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2" ng-disabled="state.permission_denied">Voice Call</button>
+                <button ng-click="startVideoCall()" ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2" ng-disabled="state.permission_denied">Video Call</button>
             </div>
         
             {{ feedback }}