mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
FS-8264 [verto_communicator] - Adapted the layout select to new response, added a separated menu in members list to set its resevartion id
This commit is contained in:
committed by
Anthony Minessale
parent
833c193d04
commit
b27dfe9448
@@ -49,6 +49,39 @@
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$rootScope.$on('changedVideoLayout', function(event, layout) {
|
||||
$scope.resIDs = getResByLayout(layout);
|
||||
|
||||
// remove resIDs param to clear every members resID.
|
||||
// passing $scope.resIDs results in preserving resIDs compatible
|
||||
// with the current layout
|
||||
clearMembersResID($scope.resIDs);
|
||||
});
|
||||
|
||||
$rootScope.$on('conference.canvasInfo', function(event, data) {
|
||||
$scope.currentLayout = data[0].layoutName;
|
||||
$scope.resIDs = getResByLayout($scope.currentLayout);
|
||||
});
|
||||
|
||||
function getResByLayout(layout) {
|
||||
var layoutsData = verto.data.confLayoutsData;
|
||||
for (var i = 0; i < layoutsData.length; i++) {
|
||||
if (layoutsData[i].name === layout) {
|
||||
return layoutsData[i].resIDS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @preserve - a array of values to be preserved
|
||||
function clearMembersResID(preserve) {
|
||||
$scope.members.forEach(function(member) {
|
||||
var resID = member.status.video.reservationID;
|
||||
if (preserve && preserve.indexOf(resID) !== -1) return;
|
||||
$scope.confResID(member.id, resID);
|
||||
});
|
||||
};
|
||||
|
||||
function findMemberByUUID(uuid) {
|
||||
var found = false;
|
||||
for (var idx in $scope.members) {
|
||||
@@ -171,6 +204,11 @@
|
||||
verto.data.conf.presenter(memberID);
|
||||
};
|
||||
|
||||
$scope.confResID = function(memberID, resID) {
|
||||
console.log('Set', memberID, 'to', resID);
|
||||
verto.setResevartionId(memberID, resID);
|
||||
};
|
||||
|
||||
$scope.confVideoFloor = function(memberID) {
|
||||
console.log('$scope.confVideoFloor');
|
||||
verto.data.conf.videoFloor(memberID);
|
||||
|
@@ -73,6 +73,8 @@
|
||||
|
||||
$scope.confChangeVideoLayout = function(layout) {
|
||||
verto.data.conf.setVideoLayout(layout);
|
||||
$scope.videoLayout = layout;
|
||||
$rootScope.$emit('changedVideoLayout', layout);
|
||||
};
|
||||
|
||||
$scope.confChangeSpeaker = function(speakerId) {
|
||||
|
Reference in New Issue
Block a user