bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/nav-bar/settings-dropdown/container.jsx

24 lines
851 B
React
Raw Normal View History

2019-03-12 00:21:12 +08:00
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
2018-06-22 00:19:42 +08:00
import browser from 'browser-detect';
import SettingsDropdown from './component';
2019-07-27 00:48:51 +08:00
import FullscreenService from '../../fullscreen-button/service';
2019-03-12 00:21:12 +08:00
const SettingsDropdownContainer = props => (
<SettingsDropdown {...props} />
);
export default withTracker((props) => {
2019-07-27 00:48:51 +08:00
const handleToggleFullscreen = () => FullscreenService.toggleFullScreen();
const BROWSER_RESULTS = browser();
const isSafari = BROWSER_RESULTS.name === 'safari';
2019-06-17 23:55:53 +08:00
const isIphone = navigator.userAgent.match(/iPhone/i);
const noIOSFullscreen = (isSafari && BROWSER_RESULTS.versionNumber < 12) || isIphone;
2019-03-12 00:21:12 +08:00
return {
amIModerator: props.amIModerator,
handleToggleFullscreen,
noIOSFullscreen,
2019-06-27 00:29:34 +08:00
isMeteorConnected: Meteor.status().connected,
2019-03-12 00:21:12 +08:00
};
})(SettingsDropdownContainer);