diff options
author | David Baker <dbkr@matrix.org> | 2014-09-19 16:26:46 +0100 |
---|---|---|
committer | David Baker <dbkr@matrix.org> | 2014-09-19 16:26:46 +0100 |
commit | 03ac0c91ae195b2931967c8c574017deaa77e7c2 (patch) | |
tree | ab8fcabb0d9c0f517405485e913d034048a1780e /webclient/room | |
parent | SYWEB-13 SYWEB-14: disabled "Call" button if the browser does not support all... (diff) | |
parent | First working version of UI chrome for video calls. (diff) | |
download | synapse-03ac0c91ae195b2931967c8c574017deaa77e7c2.tar.xz |
Merge branch 'videocalls' into develop
Conflicts: webclient/room/room.html
Diffstat (limited to 'webclient/room')
-rw-r--r-- | webclient/room/room-controller.js | 8 | ||||
-rw-r--r-- | webclient/room/room.html | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index f8dcec2b42..7f2d405122 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -860,7 +860,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; }; @@ -868,7 +870,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 1fe83c03ea..07b74248a8 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -183,6 +183,13 @@ > Voice Call </button> + <button ng-click="startVideoCall()" + ng-show="(currentCall == undefined || currentCall.state == 'ended') && memberCount() == 2" + ng-disabled="state.permission_denied || !state.webRTCSupported" + title ="{{ state.webRTCNotSupported ? '' : 'VoIP requires webRTC but your browser does not support it.'}}" + > + Video Call + </button> </div> {{ feedback }} |