// @flow import React from 'react'; import { Avatar } from '../../../avatar'; import { Video } from '../../../media'; import { connect } from '../../../redux'; import { getLocalVideoTrack } from '../../../tracks'; export type Props = { /** * The name of the user that is about to join. */ name: string, /** * Indicates whether the avatar should be shown when video is off */ showAvatar: boolean, /** * Flag signaling the visibility of camera preview. */ videoMuted: boolean, /** * The JitsiLocalTrack to display. */ videoTrack: ?Object, }; /** * Component showing the video preview and device status. * * @param {Props} props - The props of the component. * @returns {ReactElement} */ function Preview(props: Props) { const { name, showAvatar, videoMuted, videoTrack } = props; if (!videoMuted && videoTrack) { return (