bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/presentation/container.jsx
2019-05-09 17:44:54 +00:00

29 lines
1.2 KiB
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { getSwapLayout } from '/imports/ui/components/media/service';
import { notify } from '/imports/ui/services/notification';
import PresentationAreaService from './service';
import PresentationArea from './component';
const PresentationAreaContainer = ({ presentationPodIds, mountPresentationArea, ...props }) => (
mountPresentationArea && <PresentationArea {...props} />
);
export default withTracker(({ podId }) => {
const currentSlide = PresentationAreaService.getCurrentSlide(podId);
const presentationIsDownloadable = PresentationAreaService.isPresentationDownloadable(podId);
const isFullscreen = Session.get('isFullscreen');
return {
currentSlide,
downloadPresentationUri: PresentationAreaService.downloadPresentationUri(podId),
userIsPresenter: PresentationAreaService.isPresenter(podId) && !getSwapLayout(),
multiUser: PresentationAreaService.getMultiUserStatus(currentSlide && currentSlide.id)
&& !getSwapLayout(),
presentationIsDownloadable,
isFullscreen,
mountPresentationArea: !!currentSlide,
currentPresentation: PresentationAreaService.getCurrentPresentation(podId),
notify,
};
})(PresentationAreaContainer);