bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/fullscreen-button/container.jsx
Vitor Mateus De Almeida f0145e001e Add resizable and draggable in cameras dock
Remove settings and change resizable context data

Add resizable draggable drop areas in cameras dock
2021-07-13 04:25:03 -03:00

35 lines
1.2 KiB
JavaScript

import React, { useContext } from 'react';
import FullscreenButtonComponent from './component';
import FullscreenService from './service';
import { NLayoutContext } from '../layout/context/context';
const FullscreenButtonContainer = (props) => <FullscreenButtonComponent {...props} />;
export default (props) => {
const handleToggleFullScreen = (ref) => FullscreenService.toggleFullScreen(ref);
const isIphone = !!(navigator.userAgent.match(/iPhone/i));
const { isFullscreen: fullscreenProps } = props;
const newLayoutContext = useContext(NLayoutContext);
const { newLayoutContextState, newLayoutContextDispatch } = newLayoutContext;
const { layoutLoaded: layoutManagerLoaded } = newLayoutContextState;
const { fullscreen } = newLayoutContextState;
const { element: currentElement, group: currentGroup } = fullscreen;
const isFullscreen = layoutManagerLoaded === 'new' ? !!currentElement : fullscreenProps;
return (
<FullscreenButtonContainer
{...props}
{...{
handleToggleFullScreen,
isIphone,
layoutManagerLoaded,
isFullscreen,
currentElement,
currentGroup,
newLayoutContextDispatch,
}}
/>
);
};