bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/external-video-player/container.jsx

49 lines
1.3 KiB
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { Session } from 'meteor/session';
2019-09-11 02:04:42 +08:00
import { getVideoUrl } from './service';
2021-06-17 00:05:42 +08:00
import ExternalVideoComponent from './component';
2021-12-10 22:55:37 +08:00
import {
layoutSelect,
layoutSelectInput,
layoutSelectOutput,
layoutDispatch,
} from '../layout/context';
2021-06-17 00:05:42 +08:00
const ExternalVideoContainer = (props) => {
2021-12-10 22:55:37 +08:00
const fullscreenElementId = 'ExternalVideo';
2021-09-11 04:48:52 +08:00
const externalVideo = layoutSelectOutput((i) => i.externalVideo);
const cameraDock = layoutSelectInput((i) => i.cameraDock);
2021-08-13 21:47:19 +08:00
const { isResizing } = cameraDock;
2021-09-11 04:48:52 +08:00
const layoutContextDispatch = layoutDispatch();
2021-12-10 22:55:37 +08:00
const fullscreen = layoutSelect((i) => i.fullscreen);
const { element } = fullscreen;
const fullscreenContext = (element === fullscreenElementId);
2021-12-10 22:55:37 +08:00
return (
<ExternalVideoComponent
{
...{
layoutContextDispatch,
...props,
...externalVideo,
2021-08-13 21:47:19 +08:00
isResizing,
fullscreenElementId,
fullscreenContext,
}
}
/>
);
2021-06-17 00:05:42 +08:00
};
2021-09-28 03:57:02 +08:00
const LAYOUT_CONFIG = Meteor.settings.public.layout;
export default withTracker(({ isPresenter }) => {
const inEchoTest = Session.get('inEchoTest');
return {
inEchoTest,
isPresenter,
2019-09-11 02:04:42 +08:00
videoUrl: getVideoUrl(),
};
})(ExternalVideoContainer);