/* @flow */ import React from 'react'; import { getConferenceName } from '../../../base/conference/functions'; import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet'; import { getParticipantCount } from '../../../base/participants/functions'; import { connect } from '../../../base/redux'; import { E2EELabel } from '../../../e2ee'; import { LocalRecordingLabel } from '../../../local-recording'; import { getSessionStatusToShow, RecordingLabel } from '../../../recording'; import { isToolboxVisible } from '../../../toolbox/functions.web'; import { TranscribingLabel } from '../../../transcribing'; import { VideoQualityLabel } from '../../../video-quality'; import ConferenceTimer from '../ConferenceTimer'; import ParticipantsCount from './ParticipantsCount'; import { InsecureRoomNameLabel } from '.'; /** * The type of the React {@code Component} props of {@link Subject}. */ type Props = { /** * Whether the info should span across the full width. */ _fullWidth: boolean, /** * Whether the conference name and timer should be displayed or not. */ _hideConferenceNameAndTimer: boolean, /** * Whether the conference timer should be shown or not. */ _hideConferenceTimer: boolean, /** * Whether the recording label should be shown or not. */ _hideRecordingLabel: boolean, /** * Whether the participant count should be shown or not. */ _showParticipantCount: boolean, /** * The subject or the of the conference. * Falls back to conference name. */ _subject: string, /** * Indicates whether the component should be visible or not. */ _visible: boolean, /** * Whether or not the recording label is visible. */ _recordingLabel: boolean }; const getLeftMargin = () => { const subjectContainerWidth = document.getElementById('subject-container')?.clientWidth ?? 0; const recContainerWidth = document.getElementById('rec-container')?.clientWidth ?? 0; const subjectDetailsContainer = document.getElementById('subject-details-container')?.clientWidth ?? 0; return (subjectContainerWidth - recContainerWidth - subjectDetailsContainer) / 2; }; /** * The upper band of the meeing containing the conference name, timer and labels. * * @param {Object} props - The props of the component. * @returns {React$None} */ function ConferenceInfo(props: Props) { const { _hideConferenceNameAndTimer, _hideConferenceTimer, _showParticipantCount, _hideRecordingLabel, _subject, _fullWidth, _visible, _recordingLabel } = props; return (