// @flow import React from 'react'; import { setVideoInputDeviceAndUpdateSettings } from '../../../../base/devices/actions.web'; import { getVideoDeviceIds } from '../../../../base/devices/functions.web'; import Popover from '../../../../base/popover/components/Popover.web'; import { connect } from '../../../../base/redux'; import { SMALL_MOBILE_WIDTH } from '../../../../base/responsive-ui/constants'; import { getCurrentCameraDeviceId } from '../../../../base/settings'; import { toggleVideoSettings } from '../../../actions'; import { getVideoSettingsVisibility } from '../../../functions'; import VideoSettingsContent, { type Props as VideoSettingsProps } from './VideoSettingsContent'; type Props = VideoSettingsProps & { /** * Component children (the Video button). */ children: React$Node, /** * Flag controlling the visibility of the popup. */ isOpen: boolean, /** * Callback executed when the popup closes. */ onClose: Function, /** * The popup placement enum value. */ popupPlacement: string } /** * Popup with a preview of all the video devices. * * @returns {ReactElement} */ function VideoSettingsPopup({ currentCameraDeviceId, children, isOpen, onClose, popupPlacement, setVideoInputDevice, videoDeviceIds }: Props) { return (