2019-01-28 21:21:29 +08:00
|
|
|
import React from 'react';
|
2023-09-25 22:59:12 +08:00
|
|
|
import { useContext } from 'react';
|
2019-01-28 21:21:29 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import { injectIntl } from 'react-intl';
|
|
|
|
import JoinVideoButton from './component';
|
2019-11-28 21:13:06 +08:00
|
|
|
import VideoService from '../service';
|
2023-05-23 03:54:41 +08:00
|
|
|
import {
|
|
|
|
updateSettings,
|
|
|
|
} from '/imports/ui/components/settings/service';
|
2023-09-25 22:59:12 +08:00
|
|
|
import { PluginsContext } from '/imports/ui/components/components-data/plugin-context/context';
|
2019-04-19 01:14:34 +08:00
|
|
|
|
2019-01-28 21:21:29 +08:00
|
|
|
const JoinVideoOptionsContainer = (props) => {
|
|
|
|
const {
|
2023-05-23 03:54:41 +08:00
|
|
|
updateSettings,
|
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,
|
|
|
|
...restProps
|
|
|
|
} = props;
|
|
|
|
|
2023-09-25 22:59:12 +08:00
|
|
|
const {
|
2023-11-29 02:31:28 +08:00
|
|
|
pluginsExtensibleAreasAggregatedState,
|
2023-09-25 22:59:12 +08:00
|
|
|
} = useContext(PluginsContext);
|
|
|
|
let cameraSettingsDropdownItems = [];
|
2023-11-29 02:31:28 +08:00
|
|
|
if (pluginsExtensibleAreasAggregatedState.cameraSettingsDropdownItems) {
|
2023-09-25 22:59:12 +08:00
|
|
|
cameraSettingsDropdownItems = [
|
2023-11-29 02:31:28 +08:00
|
|
|
...pluginsExtensibleAreasAggregatedState.cameraSettingsDropdownItems,
|
2023-09-25 22:59:12 +08:00
|
|
|
];
|
|
|
|
}
|
2019-11-28 21:13:06 +08:00
|
|
|
return (
|
|
|
|
<JoinVideoButton {...{
|
2023-09-25 22:59:12 +08:00
|
|
|
cameraSettingsDropdownItems,
|
|
|
|
hasVideoStream,
|
|
|
|
updateSettings,
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2023-03-27 23:36:25 +08:00
|
|
|
export default injectIntl(withTracker(() => ({
|
2019-11-28 21:13:06 +08:00
|
|
|
hasVideoStream: VideoService.hasVideoStream(),
|
2023-05-23 03:54:41 +08:00
|
|
|
updateSettings,
|
2020-09-10 02:07:32 +08:00
|
|
|
disableReason: VideoService.disableReason(),
|
2022-04-05 01:02:50 +08:00
|
|
|
status: VideoService.getStatus(),
|
2023-03-27 23:36:25 +08:00
|
|
|
}))(JoinVideoOptionsContainer));
|