Browse Source

Initially mute camera/microphone when joining conference rooms.

Most users have enabled automatic access to devices, so when joining a
conference room, they immediately are visible to the other participants.
This might cause privacy issues, so we mute the devices by default and
the participant must activate them manually.
pull/404/head
Joachim Bauch 10 years ago
parent
commit
744b23bdc0
No known key found for this signature in database
GPG Key ID: 77C1D22D53E15F02
  1. 18
      static/js/controllers/uicontroller.js

18
static/js/controllers/uicontroller.js

@ -119,6 +119,8 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'tex @@ -119,6 +119,8 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'tex
var displayName = safeDisplayName;
var roomTypeConference = "Conference";
// Init STUN from server config.
(function() {
var stun = mediaStream.config.StunURIs || [];
@ -667,7 +669,23 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'tex @@ -667,7 +669,23 @@ define(['jquery', 'underscore', 'bigscreen', 'moment', 'sjcl', 'modernizr', 'tex
});
$scope.$on("room.updated", function(event, room) {
var oldType = $scope.roomType;
$scope.roomType = room ? room.Type : null;
if (oldType !== roomTypeConference && $scope.roomType == roomTypeConference) {
// Switched to conference more, start calls muted by default.
$scope.resetAutoMuteState = {
"cameraMute": $scope.cameraMute,
"microphoneMute": $scope.microphoneMute
};
$scope.cameraMute = true;
$scope.microphoneMute = true;
} else if (oldType === roomTypeConference && $scope.roomType !== roomTypeConference) {
// No longer in conference room, reset mute state to previous settings.
_.each($scope.resetAutoMuteState, function(v, k) {
$scope[k] = v;
});
$scope.resetAutoMuteState = {};
}
});
// Apply all layout stuff as classes to our element.

Loading…
Cancel
Save