bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/video-provider/video-button/container.jsx
Arthurk12 f2d5e7af2c refactor(webcam): cancellable button
Makes it possible to cancel webcam sharing while connecting.
Simplifies button state logic.
2022-04-08 18:54:47 +00:00

34 lines
1007 B
JavaScript
Executable File

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { injectIntl } from 'react-intl';
import { withModalMounter } from '/imports/ui/components/common/modal/service';
import VideoPreviewContainer from '/imports/ui/components/video-preview/container';
import JoinVideoButton from './component';
import VideoService from '../service';
const JoinVideoOptionsContainer = (props) => {
const {
hasVideoStream,
disableReason,
status,
intl,
mountModal,
...restProps
} = props;
const mountVideoPreview = (force) => { mountModal(<VideoPreviewContainer forceOpen={force} />); };
return (
<JoinVideoButton {...{
mountVideoPreview, hasVideoStream, disableReason, status, ...restProps,
}}
/>
);
};
export default withModalMounter(injectIntl(withTracker(() => ({
hasVideoStream: VideoService.hasVideoStream(),
disableReason: VideoService.disableReason(),
status: VideoService.getStatus(),
}))(JoinVideoOptionsContainer)));