bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/video-provider/video-button/container.jsx

33 lines
1.0 KiB
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { injectIntl } from 'react-intl';
2022-02-15 23:54:55 +08:00
import { withModalMounter } from '/imports/ui/components/common/modal/service';
import VideoPreviewContainer from '/imports/ui/components/video-preview/container';
import JoinVideoButton from './component';
2019-11-28 21:13:06 +08:00
import VideoService from '../service';
const JoinVideoOptionsContainer = (props) => {
const {
2019-11-28 21:13:06 +08:00
hasVideoStream,
disableReason,
intl,
mountModal,
...restProps
} = props;
const mountVideoPreview = () => { mountModal(<VideoPreviewContainer forceOpen={false} />); };
const forceMountVideoPreview = () => { mountModal(<VideoPreviewContainer forceOpen />); };
2019-11-28 21:13:06 +08:00
return (
<JoinVideoButton {...{
mountVideoPreview, forceMountVideoPreview, hasVideoStream, disableReason, ...restProps,
2019-11-28 21:13:06 +08:00
}}
/>
);
};
export default withModalMounter(injectIntl(withTracker(() => ({
2019-11-28 21:13:06 +08:00
hasVideoStream: VideoService.hasVideoStream(),
disableReason: VideoService.disableReason(),
}))(JoinVideoOptionsContainer)));