2022-02-07 21:22:52 +08:00
|
|
|
import Auth from '/imports/ui/services/auth';
|
|
|
|
import Meetings from '/imports/api/meetings';
|
|
|
|
|
|
|
|
export function getDisabledFeatures() {
|
|
|
|
const selector = {
|
|
|
|
meetingId: Auth.meetingID,
|
|
|
|
};
|
|
|
|
|
2022-02-08 02:55:45 +08:00
|
|
|
const meetingData = Meetings.findOne(selector, { fields: { 'meetingProp.disabledFeatures': 1 } });
|
|
|
|
const disabledFeatures = ((meetingData || {}).meetingProp || {}).disabledFeatures || [];
|
2022-02-07 21:22:52 +08:00
|
|
|
|
|
|
|
return disabledFeatures;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isScreenSharingEnabled() {
|
2022-02-08 02:55:45 +08:00
|
|
|
return getDisabledFeatures().indexOf('screenshare') === -1 && Meteor.settings.public.kurento.enableScreensharing;
|
2022-02-07 21:22:52 +08:00
|
|
|
}
|
2022-03-02 04:27:54 +08:00
|
|
|
|
|
|
|
export function isLearningDashboardEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('learningDashboard') === -1;
|
|
|
|
}
|
2022-03-09 02:05:24 +08:00
|
|
|
|
|
|
|
export function isPollingEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('polls') === -1 && Meteor.settings.public.poll.enabled;
|
|
|
|
}
|
2022-03-09 21:33:18 +08:00
|
|
|
|
|
|
|
export function isExternalVideoEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('externalVideos') === -1 && Meteor.settings.public.externalVideoPlayer.enabled;
|
|
|
|
}
|
2022-03-09 22:19:25 +08:00
|
|
|
|
|
|
|
export function isChatEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('chat') === -1 && Meteor.settings.public.chat.enabled;
|
|
|
|
}
|
2022-03-15 21:40:02 +08:00
|
|
|
|
2022-03-10 03:23:38 +08:00
|
|
|
export function isSharedNotesEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('sharedNotes') === -1 && Meteor.settings.public.notes.enabled;
|
|
|
|
}
|
2022-03-11 02:02:20 +08:00
|
|
|
|
|
|
|
export function isCaptionsEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('captions') === -1 && Meteor.settings.public.captions.enabled;
|
|
|
|
}
|
2022-03-15 02:30:41 +08:00
|
|
|
|
|
|
|
export function isBreakoutRoomsEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('breakoutRooms') === -1;
|
|
|
|
}
|
2022-03-19 02:46:45 +08:00
|
|
|
|
2022-03-15 21:40:02 +08:00
|
|
|
export function isLayoutsEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('layouts') === -1;
|
|
|
|
}
|
2022-03-23 03:01:27 +08:00
|
|
|
|
|
|
|
export function isVirtualBackgroundsEnabled() {
|
2022-07-07 20:37:27 +08:00
|
|
|
return getDisabledFeatures().indexOf('virtualBackgrounds') === -1 && Meteor.settings.public.virtualBackgrounds.enabled;
|
2022-03-23 03:01:27 +08:00
|
|
|
}
|
2022-07-09 04:01:57 +08:00
|
|
|
|
|
|
|
export function isCustomVirtualBackgroundsEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('customVirtualBackgrounds') === -1;
|
2022-03-23 03:01:27 +08:00
|
|
|
}
|
2022-07-13 00:58:56 +08:00
|
|
|
|
2022-08-02 21:53:40 +08:00
|
|
|
export function isDownloadPresentationWithAnnotationsEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('downloadPresentationWithAnnotations') === -1 && Meteor.settings.public.presentation.allowDownloadable;
|
2022-07-13 00:58:56 +08:00
|
|
|
}
|
|
|
|
|
2022-08-02 21:53:40 +08:00
|
|
|
export function isImportPresentationWithAnnotationsFromBreakoutRoomsEnabled() {
|
|
|
|
return getDisabledFeatures().indexOf('importPresentationWithAnnotationsFromBreakoutRooms') === -1;
|
2022-07-13 00:58:56 +08:00
|
|
|
}
|