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

28 lines
756 B
React
Raw Normal View History

import React from 'react';
import FullscreenButtonComponent from './component';
2021-09-11 04:48:52 +08:00
import { layoutSelect, layoutDispatch } from '../layout/context';
2021-07-06 22:17:00 +08:00
const FullscreenButtonContainer = (props) => <FullscreenButtonComponent {...props} />;
export default (props) => {
2021-07-06 22:17:00 +08:00
const isIphone = !!(navigator.userAgent.match(/iPhone/i));
2021-06-25 00:47:16 +08:00
2021-09-11 04:48:52 +08:00
const fullscreen = layoutSelect((i) => i.fullscreen);
const { element: currentElement, group: currentGroup } = fullscreen;
2021-08-05 12:22:07 +08:00
const isFullscreen = !!currentElement;
2021-09-11 04:48:52 +08:00
const layoutContextDispatch = layoutDispatch();
2021-06-25 00:47:16 +08:00
return (
2021-07-06 22:17:00 +08:00
<FullscreenButtonContainer
{...props}
{...{
isIphone,
isFullscreen,
currentElement,
currentGroup,
2021-08-05 19:03:24 +08:00
layoutContextDispatch,
2021-07-06 22:17:00 +08:00
}}
/>
);
};