2024-04-20 03:27:01 +08:00
|
|
|
import React, { useEffect, useRef } from 'react';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2017-07-14 22:18:07 +08:00
|
|
|
import Auth from '/imports/ui/services/auth';
|
2021-10-20 04:35:39 +08:00
|
|
|
import Users from '/imports/api/users';
|
2024-04-20 03:27:01 +08:00
|
|
|
import Meetings from '/imports/api/meetings';
|
2024-01-30 00:27:30 +08:00
|
|
|
import AudioCaptionsLiveContainer from '/imports/ui/components/audio/audio-graphql/audio-captions/live/component';
|
2019-04-13 14:06:50 +08:00
|
|
|
import { notify } from '/imports/ui/services/notification';
|
2018-10-19 04:37:14 +08:00
|
|
|
import getFromUserSettings from '/imports/ui/services/users-settings';
|
2019-05-09 01:52:12 +08:00
|
|
|
import deviceInfo from '/imports/utils/deviceInfo';
|
2021-06-15 04:25:05 +08:00
|
|
|
import MediaService from '/imports/ui/components/media/service';
|
2023-11-29 21:22:59 +08:00
|
|
|
import { isPresentationEnabled, isExternalVideoEnabled } from '/imports/ui/services/features';
|
2024-03-13 22:11:58 +08:00
|
|
|
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
|
|
|
|
import useMeeting from '/imports/ui/core/hooks/useMeeting';
|
2024-06-04 21:40:54 +08:00
|
|
|
import { ACTIONS, LAYOUT_TYPE, PRESENTATION_AREA } from '/imports/ui/components/layout/enums';
|
2024-06-11 04:20:41 +08:00
|
|
|
import { useMutation, useReactiveVar } from '@apollo/client';
|
2021-10-20 04:35:39 +08:00
|
|
|
import {
|
|
|
|
layoutSelect,
|
|
|
|
layoutSelectInput,
|
|
|
|
layoutSelectOutput,
|
|
|
|
layoutDispatch,
|
2021-09-11 04:48:52 +08:00
|
|
|
} from '../layout/context';
|
2024-01-11 21:33:25 +08:00
|
|
|
import { SET_SYNC_WITH_PRESENTER_LAYOUT, SET_LAYOUT_PROPS } from './mutations';
|
2019-04-11 03:40:40 +08:00
|
|
|
|
2016-11-07 23:52:39 +08:00
|
|
|
import {
|
2018-10-24 01:18:09 +08:00
|
|
|
getBreakoutRooms,
|
2016-11-07 23:52:39 +08:00
|
|
|
} from './service';
|
|
|
|
|
2017-03-17 03:57:45 +08:00
|
|
|
import App from './component';
|
2024-01-30 21:03:11 +08:00
|
|
|
import useUserChangedLocalSettings from '../../services/settings/hooks/useUserChangedLocalSettings';
|
2024-05-01 20:39:03 +08:00
|
|
|
import { PINNED_PAD_SUBSCRIPTION } from '../notes/queries';
|
2024-06-11 04:20:41 +08:00
|
|
|
import connectionStatus from '../../core/graphql/singletons/connectionStatus';
|
2024-06-04 21:40:54 +08:00
|
|
|
import useDeduplicatedSubscription from '../../core/hooks/useDeduplicatedSubscription';
|
2024-05-06 23:19:27 +08:00
|
|
|
import VideoStreamsState from '../video-provider/video-provider-graphql/state';
|
2024-05-24 22:44:36 +08:00
|
|
|
import { useIsSharing, useSharingContentType } from '../screenshare/service';
|
2024-05-18 04:33:52 +08:00
|
|
|
import useSettings from '../../services/settings/hooks/useSettings';
|
|
|
|
import { SETTINGS } from '../../services/settings/enums';
|
2024-06-06 21:50:03 +08:00
|
|
|
import { useStorageKey } from '../../services/storage/hooks';
|
2024-06-07 02:47:41 +08:00
|
|
|
import useMuteMicrophone from '../audio/audio-graphql/hooks/useMuteMicrophone';
|
2016-12-23 07:34:20 +08:00
|
|
|
|
2017-07-14 22:18:07 +08:00
|
|
|
const AppContainer = (props) => {
|
2023-02-17 00:23:41 +08:00
|
|
|
const layoutType = useRef(null);
|
|
|
|
|
2017-10-06 22:58:21 +08:00
|
|
|
const {
|
|
|
|
actionsbar,
|
2022-03-09 23:09:56 +08:00
|
|
|
pushLayoutMeeting,
|
2021-06-30 22:29:03 +08:00
|
|
|
currentUserId,
|
2023-11-30 21:24:25 +08:00
|
|
|
shouldShowScreenshare: propsShouldShowScreenshare,
|
2021-09-22 19:48:25 +08:00
|
|
|
presentationRestoreOnUpdate,
|
2021-12-02 01:58:36 +08:00
|
|
|
isModalOpen,
|
2022-09-03 02:18:17 +08:00
|
|
|
meetingLayout,
|
|
|
|
meetingLayoutUpdatedAt,
|
|
|
|
meetingPresentationIsOpen,
|
2022-10-10 21:32:19 +08:00
|
|
|
isMeetingLayoutResizing,
|
2022-09-03 02:18:17 +08:00
|
|
|
meetingLayoutCameraPosition,
|
|
|
|
meetingLayoutFocusedCamera,
|
|
|
|
meetingLayoutVideoRate,
|
2017-10-06 22:58:21 +08:00
|
|
|
...otherProps
|
|
|
|
} = props;
|
2021-09-10 21:16:44 +08:00
|
|
|
|
2024-06-06 21:50:03 +08:00
|
|
|
const isLargeFont = useStorageKey('isLargeFont');
|
|
|
|
const ignorePollNotifications = useStorageKey('ignorePollNotifications');
|
|
|
|
|
2024-05-29 21:26:11 +08:00
|
|
|
const NOTES_CONFIG = window.meetingClientSettings.public.notes;
|
|
|
|
|
2024-05-18 04:33:52 +08:00
|
|
|
const {
|
|
|
|
selectedLayout,
|
|
|
|
pushLayout,
|
|
|
|
audioAlertEnabled,
|
|
|
|
pushAlertEnabled,
|
|
|
|
darkTheme,
|
|
|
|
fontSize = '16px',
|
|
|
|
} = useSettings(SETTINGS.APPLICATION);
|
|
|
|
const {
|
|
|
|
viewScreenshare,
|
|
|
|
} = useSettings(SETTINGS.DATA_SAVING);
|
|
|
|
|
2021-09-11 04:48:52 +08:00
|
|
|
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
|
2024-02-19 18:59:45 +08:00
|
|
|
const genericComponent = layoutSelectInput((i) => i.genericComponent);
|
2021-09-11 04:48:52 +08:00
|
|
|
const sidebarNavigation = layoutSelectInput((i) => i.sidebarNavigation);
|
|
|
|
const actionsBarStyle = layoutSelectOutput((i) => i.actionBar);
|
|
|
|
const captionsStyle = layoutSelectOutput((i) => i.captions);
|
2022-02-11 22:30:35 +08:00
|
|
|
const cameraDock = layoutSelectOutput((i) => i.cameraDock);
|
2022-03-23 02:29:49 +08:00
|
|
|
const cameraDockInput = layoutSelectInput((i) => i.cameraDock);
|
2021-09-14 02:41:52 +08:00
|
|
|
const presentation = layoutSelectInput((i) => i.presentation);
|
2024-04-19 22:08:13 +08:00
|
|
|
const sharedNotesInput = layoutSelectInput((i) => i.sharedNotes);
|
2021-09-11 04:48:52 +08:00
|
|
|
const deviceType = layoutSelect((i) => i.deviceType);
|
2024-06-04 21:40:54 +08:00
|
|
|
const hasExternalVideoOnLayout = layoutSelectInput((i) => i.externalVideo.hasExternalVideo);
|
2021-09-11 04:48:52 +08:00
|
|
|
const layoutContextDispatch = layoutDispatch();
|
2021-09-10 21:16:44 +08:00
|
|
|
|
2024-01-11 20:41:08 +08:00
|
|
|
const [setSyncWithPresenterLayout] = useMutation(SET_SYNC_WITH_PRESENTER_LAYOUT);
|
2024-01-11 21:33:25 +08:00
|
|
|
const [setMeetingLayoutProps] = useMutation(SET_LAYOUT_PROPS);
|
2024-01-30 21:03:11 +08:00
|
|
|
const setLocalSettings = useUserChangedLocalSettings();
|
2024-06-04 21:40:54 +08:00
|
|
|
const { data: pinnedPadData } = useDeduplicatedSubscription(PINNED_PAD_SUBSCRIPTION);
|
2024-04-19 22:08:13 +08:00
|
|
|
const isSharedNotesPinnedFromGraphql = !!pinnedPadData
|
2024-01-16 03:49:09 +08:00
|
|
|
&& pinnedPadData.sharedNotes[0]?.sharedNotesExtId === NOTES_CONFIG.id;
|
2024-04-19 22:08:13 +08:00
|
|
|
const isSharedNotesPinned = sharedNotesInput?.isPinned && isSharedNotesPinnedFromGraphql;
|
2024-05-06 23:19:27 +08:00
|
|
|
const isThereWebcam = VideoStreamsState.getStreams().length > 0;
|
2024-06-07 02:47:41 +08:00
|
|
|
const muteMicrophone = useMuteMicrophone();
|
2023-12-07 03:57:31 +08:00
|
|
|
|
2023-11-30 21:24:25 +08:00
|
|
|
const { data: currentUserData } = useCurrentUser((user) => ({
|
|
|
|
enforceLayout: user.enforceLayout,
|
|
|
|
isModerator: user.isModerator,
|
|
|
|
presenter: user.presenter,
|
2024-04-17 06:39:29 +08:00
|
|
|
speechLocale: user.speechLocale,
|
2024-04-25 22:53:56 +08:00
|
|
|
inactivityWarningDisplay: user.inactivityWarningDisplay,
|
|
|
|
inactivityWarningTimeoutSecs: user.inactivityWarningTimeoutSecs,
|
2023-11-30 21:24:25 +08:00
|
|
|
}));
|
|
|
|
|
|
|
|
const isModerator = currentUserData?.isModerator;
|
|
|
|
const isPresenter = currentUserData?.presenter;
|
2024-04-25 22:53:56 +08:00
|
|
|
const inactivityWarningDisplay = currentUserData?.inactivityWarningDisplay;
|
|
|
|
const inactivityWarningTimeoutSecs = currentUserData?.inactivityWarningTimeoutSecs;
|
2023-11-30 21:24:25 +08:00
|
|
|
|
2021-09-14 02:41:52 +08:00
|
|
|
const { sidebarContentPanel, isOpen: sidebarContentIsOpen } = sidebarContent;
|
|
|
|
const { sidebarNavPanel, isOpen: sidebarNavigationIsOpen } = sidebarNavigation;
|
2023-02-17 23:44:36 +08:00
|
|
|
const { isOpen } = presentation;
|
2023-02-21 23:44:12 +08:00
|
|
|
const presentationIsOpen = isOpen;
|
|
|
|
|
2022-02-11 22:30:35 +08:00
|
|
|
const { focusedId } = cameraDock;
|
|
|
|
|
2024-06-11 04:20:41 +08:00
|
|
|
const connected = useReactiveVar(connectionStatus.getConnectedStatusVar());
|
|
|
|
|
2023-07-20 00:22:50 +08:00
|
|
|
useEffect(() => {
|
|
|
|
if (
|
|
|
|
layoutContextDispatch
|
|
|
|
&& (typeof meetingLayout !== 'undefined')
|
|
|
|
&& (layoutType.current !== meetingLayout)
|
2024-04-25 00:07:06 +08:00
|
|
|
&& sharedNotesInput?.isPinned
|
2023-02-17 00:23:41 +08:00
|
|
|
) {
|
|
|
|
layoutType.current = meetingLayout;
|
|
|
|
MediaService.setPresentationIsOpen(layoutContextDispatch, true);
|
2023-07-20 00:22:50 +08:00
|
|
|
}
|
|
|
|
}, [meetingLayout, layoutContextDispatch, layoutType]);
|
2023-02-17 00:23:41 +08:00
|
|
|
|
2022-02-12 03:41:22 +08:00
|
|
|
const horizontalPosition = cameraDock.position === 'contentLeft' || cameraDock.position === 'contentRight';
|
2022-02-05 02:03:39 +08:00
|
|
|
// this is not exactly right yet
|
|
|
|
let presentationVideoRate;
|
2022-02-12 03:41:22 +08:00
|
|
|
if (horizontalPosition) {
|
2022-02-05 02:03:39 +08:00
|
|
|
presentationVideoRate = cameraDock.width / window.innerWidth;
|
2022-02-12 03:41:22 +08:00
|
|
|
} else {
|
|
|
|
presentationVideoRate = cameraDock.height / window.innerHeight;
|
2022-02-05 02:03:39 +08:00
|
|
|
}
|
2022-03-17 01:12:11 +08:00
|
|
|
presentationVideoRate = parseFloat(presentationVideoRate.toFixed(2));
|
2022-02-05 02:03:39 +08:00
|
|
|
|
2022-05-12 05:48:12 +08:00
|
|
|
const setPushLayout = () => {
|
2024-01-11 20:41:08 +08:00
|
|
|
setSyncWithPresenterLayout({
|
|
|
|
variables: {
|
|
|
|
syncWithPresenterLayout: pushLayout,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
2022-05-12 05:48:12 +08:00
|
|
|
|
2022-02-08 03:36:21 +08:00
|
|
|
const setMeetingLayout = () => {
|
2022-03-23 02:29:49 +08:00
|
|
|
const { isResizing } = cameraDockInput;
|
2024-01-11 21:33:25 +08:00
|
|
|
|
|
|
|
setMeetingLayoutProps({
|
|
|
|
variables: {
|
|
|
|
layout: selectedLayout,
|
|
|
|
syncWithPresenterLayout: pushLayout,
|
|
|
|
presentationIsOpen,
|
|
|
|
isResizing,
|
2024-04-02 21:59:01 +08:00
|
|
|
cameraPosition: cameraDock.position || 'contentTop',
|
2024-01-11 21:33:25 +08:00
|
|
|
focusedCamera: focusedId,
|
|
|
|
presentationVideoRate,
|
|
|
|
},
|
2022-03-23 02:29:49 +08:00
|
|
|
});
|
|
|
|
};
|
2022-02-08 03:36:21 +08:00
|
|
|
|
2023-11-29 21:22:59 +08:00
|
|
|
const { data: currentMeeting } = useMeeting((m) => ({
|
2024-06-04 21:40:54 +08:00
|
|
|
componentsFlags: m.componentsFlags,
|
2023-11-29 21:22:59 +08:00
|
|
|
}));
|
|
|
|
|
2024-06-04 21:40:54 +08:00
|
|
|
const isSharingVideo = currentMeeting?.componentsFlags.hasExternalVideo;
|
2023-11-29 21:22:59 +08:00
|
|
|
|
2023-02-21 23:44:12 +08:00
|
|
|
useEffect(() => {
|
2024-05-06 23:19:27 +08:00
|
|
|
MediaService.buildLayoutWhenPresentationAreaIsDisabled(
|
|
|
|
layoutContextDispatch,
|
|
|
|
isSharingVideo,
|
|
|
|
sharedNotesInput?.isPinned,
|
|
|
|
isThereWebcam,
|
|
|
|
);
|
2023-07-20 00:22:50 +08:00
|
|
|
});
|
2023-05-15 22:58:30 +08:00
|
|
|
|
2024-06-04 21:40:54 +08:00
|
|
|
useEffect(() => {
|
|
|
|
if (isSharingVideo && !hasExternalVideoOnLayout) {
|
|
|
|
layoutContextDispatch({
|
|
|
|
type: ACTIONS.SET_PILE_CONTENT_FOR_PRESENTATION_AREA,
|
|
|
|
value: {
|
|
|
|
content: PRESENTATION_AREA.EXTERNAL_VIDEO,
|
|
|
|
open: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
layoutContextDispatch({
|
|
|
|
type: ACTIONS.SET_HAS_EXTERNAL_VIDEO,
|
|
|
|
value: true,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}, [isSharingVideo]);
|
|
|
|
|
2023-11-29 21:22:59 +08:00
|
|
|
const shouldShowExternalVideo = isExternalVideoEnabled() && isSharingVideo;
|
|
|
|
|
2024-03-26 05:13:57 +08:00
|
|
|
const shouldShowGenericComponent = !!genericComponent.genericComponentId;
|
2024-02-19 18:59:45 +08:00
|
|
|
|
2023-11-30 21:24:25 +08:00
|
|
|
const validateEnforceLayout = (currentUser) => {
|
2024-05-10 21:35:25 +08:00
|
|
|
const layoutTypes = Object.keys(LAYOUT_TYPE);
|
2023-11-30 21:24:25 +08:00
|
|
|
const enforceLayout = currentUser?.enforceLayout;
|
2023-11-23 01:21:07 +08:00
|
|
|
return enforceLayout && layoutTypes.includes(enforceLayout) ? enforceLayout : null;
|
|
|
|
};
|
|
|
|
|
2024-03-13 22:11:58 +08:00
|
|
|
const shouldShowScreenshare = propsShouldShowScreenshare
|
2024-02-19 18:59:45 +08:00
|
|
|
&& (viewScreenshare || isPresenter);
|
2024-04-19 22:08:13 +08:00
|
|
|
const shouldShowPresentation = (!shouldShowScreenshare && !isSharedNotesPinned
|
2024-02-19 18:59:45 +08:00
|
|
|
&& !shouldShowExternalVideo && !shouldShowGenericComponent
|
2023-11-30 21:24:25 +08:00
|
|
|
&& (presentationIsOpen || presentationRestoreOnUpdate)) && isPresentationEnabled();
|
2024-04-17 06:39:29 +08:00
|
|
|
|
|
|
|
if (!currentUserData) return null;
|
|
|
|
|
2021-07-21 21:19:47 +08:00
|
|
|
return currentUserId
|
|
|
|
? (
|
|
|
|
<App
|
|
|
|
{...{
|
2024-06-11 04:20:41 +08:00
|
|
|
connected,
|
2021-07-21 21:19:47 +08:00
|
|
|
actionsBarStyle,
|
2021-08-16 21:38:39 +08:00
|
|
|
captionsStyle,
|
2021-07-21 21:19:47 +08:00
|
|
|
currentUserId,
|
2022-05-12 05:48:12 +08:00
|
|
|
setPushLayout,
|
2022-02-08 03:36:21 +08:00
|
|
|
setMeetingLayout,
|
2021-07-21 21:19:47 +08:00
|
|
|
meetingLayout,
|
2021-11-19 22:36:06 +08:00
|
|
|
selectedLayout,
|
2021-12-16 04:09:21 +08:00
|
|
|
pushLayout,
|
2022-03-09 23:09:56 +08:00
|
|
|
pushLayoutMeeting,
|
2022-02-05 02:03:39 +08:00
|
|
|
meetingLayoutUpdatedAt,
|
2022-02-11 22:32:08 +08:00
|
|
|
presentationIsOpen,
|
|
|
|
cameraPosition: cameraDock.position,
|
|
|
|
focusedCamera: focusedId,
|
|
|
|
presentationVideoRate,
|
2022-02-05 02:03:39 +08:00
|
|
|
cameraWidth: cameraDock.width,
|
|
|
|
cameraHeight: cameraDock.height,
|
2022-03-23 02:29:49 +08:00
|
|
|
cameraIsResizing: cameraDockInput.isResizing,
|
2022-09-03 02:18:17 +08:00
|
|
|
meetingPresentationIsOpen,
|
2022-10-10 21:32:19 +08:00
|
|
|
isMeetingLayoutResizing,
|
2022-09-03 02:18:17 +08:00
|
|
|
meetingLayoutCameraPosition,
|
|
|
|
meetingLayoutFocusedCamera,
|
|
|
|
meetingLayoutVideoRate,
|
2022-02-12 03:41:22 +08:00
|
|
|
horizontalPosition,
|
2021-07-21 21:19:47 +08:00
|
|
|
deviceType,
|
2021-08-05 19:03:24 +08:00
|
|
|
layoutContextDispatch,
|
2021-07-21 21:19:47 +08:00
|
|
|
sidebarNavPanel,
|
|
|
|
sidebarNavigationIsOpen,
|
|
|
|
sidebarContentPanel,
|
|
|
|
sidebarContentIsOpen,
|
2023-11-29 21:22:59 +08:00
|
|
|
shouldShowExternalVideo,
|
2021-12-02 01:58:36 +08:00
|
|
|
isPresenter,
|
2022-11-23 01:15:15 +08:00
|
|
|
numCameras: cameraDockInput.numCameras,
|
2023-11-23 01:21:07 +08:00
|
|
|
enforceLayout: validateEnforceLayout(currentUserData),
|
2024-04-17 06:39:29 +08:00
|
|
|
speechLocale: currentUserData?.speechLocale,
|
2023-11-30 21:24:25 +08:00
|
|
|
isModerator,
|
|
|
|
shouldShowScreenshare,
|
2024-04-19 22:08:13 +08:00
|
|
|
isSharedNotesPinned,
|
2023-11-30 21:24:25 +08:00
|
|
|
shouldShowPresentation,
|
2024-01-30 21:03:11 +08:00
|
|
|
setLocalSettings,
|
2024-03-26 05:13:57 +08:00
|
|
|
genericComponentId: genericComponent.genericComponentId,
|
2024-06-04 04:14:32 +08:00
|
|
|
audioCaptions: <AudioCaptionsLiveContainer />,
|
2024-04-25 22:53:56 +08:00
|
|
|
inactivityWarningDisplay,
|
|
|
|
inactivityWarningTimeoutSecs,
|
2024-05-18 04:33:52 +08:00
|
|
|
audioAlertEnabled,
|
|
|
|
pushAlertEnabled,
|
|
|
|
darkTheme,
|
|
|
|
fontSize,
|
2024-06-06 21:50:03 +08:00
|
|
|
isLargeFont,
|
|
|
|
ignorePollNotifications,
|
2024-06-07 02:47:41 +08:00
|
|
|
muteMicrophone,
|
2021-07-21 21:19:47 +08:00
|
|
|
}}
|
|
|
|
{...otherProps}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
: null;
|
2017-07-14 22:18:07 +08:00
|
|
|
};
|
2016-07-07 22:01:40 +08:00
|
|
|
|
2021-05-18 04:25:07 +08:00
|
|
|
const currentUserEmoji = (currentUser) => (currentUser
|
|
|
|
? {
|
|
|
|
status: currentUser.emoji,
|
|
|
|
changedAt: currentUser.emojiTime,
|
|
|
|
}
|
|
|
|
: {
|
2020-10-08 03:50:17 +08:00
|
|
|
status: 'none',
|
|
|
|
changedAt: null,
|
2021-05-18 04:25:07 +08:00
|
|
|
}
|
|
|
|
);
|
2019-08-31 02:43:48 +08:00
|
|
|
|
2024-05-24 22:44:36 +08:00
|
|
|
const AppTracker = withTracker((props) => {
|
2024-05-28 21:50:15 +08:00
|
|
|
const {
|
|
|
|
viewScreenshare,
|
|
|
|
isScreenSharing,
|
|
|
|
screenSharingContentType,
|
|
|
|
} = props;
|
2021-05-18 04:25:07 +08:00
|
|
|
const currentUser = Users.findOne(
|
|
|
|
{ userId: Auth.userID },
|
|
|
|
{
|
|
|
|
fields:
|
|
|
|
{
|
2024-03-13 22:11:58 +08:00
|
|
|
approved: 1, emoji: 1, raiseHand: 1, away: 1, userId: 1, role: 1, inactivityCheck: 1,
|
2021-05-18 04:25:07 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
2022-01-11 13:02:24 +08:00
|
|
|
|
2024-03-26 19:57:28 +08:00
|
|
|
const meetingLayoutObj = Meetings
|
|
|
|
.findOne({ meetingId: Auth.meetingID }) || {};
|
|
|
|
|
|
|
|
const { layout } = meetingLayoutObj;
|
|
|
|
|
2022-09-03 02:18:17 +08:00
|
|
|
const {
|
2024-03-26 19:57:28 +08:00
|
|
|
propagateLayout: pushLayoutMeeting,
|
|
|
|
cameraDockIsResizing: isMeetingLayoutResizing,
|
|
|
|
cameraDockPlacement: meetingLayoutCameraPosition,
|
2024-04-01 22:20:10 +08:00
|
|
|
cameraDockAspectRatio: meetingLayoutVideoRate,
|
2024-03-26 19:57:28 +08:00
|
|
|
cameraWithFocus: meetingLayoutFocusedCamera,
|
|
|
|
} = layout;
|
2024-04-01 22:20:10 +08:00
|
|
|
const meetingLayout = LAYOUT_TYPE[layout.currentLayoutType];
|
2024-03-26 19:57:28 +08:00
|
|
|
const meetingLayoutUpdatedAt = new Date(layout.updatedAt).getTime();
|
|
|
|
|
|
|
|
const meetingPresentationIsOpen = !layout.presentationMinimized;
|
2024-05-24 22:44:36 +08:00
|
|
|
const shouldShowScreenshare = MediaService.shouldShowScreenshare(
|
2024-05-28 21:50:15 +08:00
|
|
|
viewScreenshare,
|
2024-05-24 22:44:36 +08:00
|
|
|
isScreenSharing,
|
|
|
|
screenSharingContentType,
|
|
|
|
);
|
2021-08-05 10:36:30 +08:00
|
|
|
let customStyleUrl = getFromUserSettings('bbb_custom_style_url', false);
|
|
|
|
|
2024-05-29 21:26:11 +08:00
|
|
|
const CUSTOM_STYLE_URL = window.meetingClientSettings.public.app.customStyleUrl;
|
|
|
|
|
2021-08-05 10:36:30 +08:00
|
|
|
if (!customStyleUrl && CUSTOM_STYLE_URL) {
|
|
|
|
customStyleUrl = CUSTOM_STYLE_URL;
|
|
|
|
}
|
2021-05-18 04:25:07 +08:00
|
|
|
|
2024-03-07 01:28:18 +08:00
|
|
|
const LAYOUT_CONFIG = window.meetingClientSettings.public.layout;
|
2021-09-28 03:57:02 +08:00
|
|
|
|
2017-06-03 03:25:02 +08:00
|
|
|
return {
|
2024-04-20 03:27:01 +08:00
|
|
|
audioCaptions: <AudioCaptionsLiveContainer />,
|
2018-10-24 01:18:09 +08:00
|
|
|
hasBreakoutRooms: getBreakoutRooms().length > 0,
|
2019-07-22 22:28:13 +08:00
|
|
|
customStyle: getFromUserSettings('bbb_custom_style', false),
|
2021-08-05 10:36:30 +08:00
|
|
|
customStyleUrl,
|
2019-04-13 14:06:50 +08:00
|
|
|
notify,
|
2021-04-01 01:13:36 +08:00
|
|
|
isPhone: deviceInfo.isPhone,
|
2019-07-16 03:15:58 +08:00
|
|
|
isRTL: document.documentElement.getAttribute('dir') === 'rtl',
|
2019-08-31 02:43:48 +08:00
|
|
|
currentUserEmoji: currentUserEmoji(currentUser),
|
2023-06-08 09:57:49 +08:00
|
|
|
currentUserAway: currentUser.away,
|
|
|
|
currentUserRaiseHand: currentUser.raiseHand,
|
2021-06-30 22:29:03 +08:00
|
|
|
currentUserId: currentUser?.userId,
|
2022-09-03 02:18:17 +08:00
|
|
|
meetingLayout,
|
|
|
|
meetingLayoutUpdatedAt,
|
|
|
|
meetingPresentationIsOpen,
|
|
|
|
isMeetingLayoutResizing,
|
|
|
|
meetingLayoutCameraPosition,
|
|
|
|
meetingLayoutFocusedCamera,
|
|
|
|
meetingLayoutVideoRate,
|
2022-03-09 23:09:56 +08:00
|
|
|
pushLayoutMeeting,
|
2021-06-15 04:25:05 +08:00
|
|
|
shouldShowScreenshare,
|
2021-09-22 19:48:25 +08:00
|
|
|
presentationRestoreOnUpdate: getFromUserSettings(
|
|
|
|
'bbb_force_restore_presentation_on_new_events',
|
2024-03-07 01:28:18 +08:00
|
|
|
window.meetingClientSettings.public.presentation.restoreOnUpdate,
|
2021-09-22 19:48:25 +08:00
|
|
|
),
|
2023-02-18 01:59:39 +08:00
|
|
|
hidePresentationOnJoin: getFromUserSettings('bbb_hide_presentation_on_join', LAYOUT_CONFIG.hidePresentationOnJoin),
|
2021-10-20 03:20:31 +08:00
|
|
|
hideActionsBar: getFromUserSettings('bbb_hide_actions_bar', false),
|
2023-11-28 22:45:12 +08:00
|
|
|
hideNavBar: getFromUserSettings('bbb_hide_nav_bar', false),
|
2024-03-13 22:11:58 +08:00
|
|
|
User: currentUser,
|
2017-06-03 03:25:02 +08:00
|
|
|
};
|
2023-04-11 22:02:00 +08:00
|
|
|
})(AppContainer);
|
2024-05-24 22:44:36 +08:00
|
|
|
|
|
|
|
// TODO: Remove this
|
|
|
|
// Temporary component until we remove all trackers
|
|
|
|
export default (props) => {
|
|
|
|
const isScreenSharing = useIsSharing();
|
|
|
|
const screenSharingContentType = useSharingContentType();
|
|
|
|
return (
|
|
|
|
<AppTracker
|
|
|
|
{...{
|
|
|
|
...props,
|
|
|
|
isScreenSharing,
|
|
|
|
screenSharingContentType,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|