2019-01-28 21:21:29 +08:00
|
|
|
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';
|
2019-01-28 21:21:29 +08:00
|
|
|
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';
|
2019-04-19 01:14:34 +08:00
|
|
|
|
2019-01-28 21:21:29 +08:00
|
|
|
const JoinVideoOptionsContainer = (props) => {
|
|
|
|
const {
|
2019-11-28 21:13:06 +08:00
|
|
|
hasVideoStream,
|
2020-09-10 02:07:32 +08:00
|
|
|
disableReason,
|
2022-04-05 01:02:50 +08:00
|
|
|
status,
|
2019-01-28 21:21:29 +08:00
|
|
|
intl,
|
|
|
|
mountModal,
|
|
|
|
...restProps
|
|
|
|
} = props;
|
|
|
|
|
2022-04-12 01:09:13 +08:00
|
|
|
const mountVideoPreview = (force, props) => { mountModal(<VideoPreviewContainer forceOpen={force} {...(props || {})} />); };
|
2019-01-28 21:21:29 +08:00
|
|
|
|
2019-11-28 21:13:06 +08:00
|
|
|
return (
|
|
|
|
<JoinVideoButton {...{
|
2022-04-05 01:02:50 +08:00
|
|
|
mountVideoPreview, hasVideoStream, disableReason, status, ...restProps,
|
2019-11-28 21:13:06 +08:00
|
|
|
}}
|
|
|
|
/>
|
2019-04-19 01:14:34 +08:00
|
|
|
);
|
2019-01-28 21:21:29 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default withModalMounter(injectIntl(withTracker(() => ({
|
2019-11-28 21:13:06 +08:00
|
|
|
hasVideoStream: VideoService.hasVideoStream(),
|
2020-09-10 02:07:32 +08:00
|
|
|
disableReason: VideoService.disableReason(),
|
2022-04-05 01:02:50 +08:00
|
|
|
status: VideoService.getStatus(),
|
2019-01-28 21:21:29 +08:00
|
|
|
}))(JoinVideoOptionsContainer)));
|