|
|
|
@ -8,7 +8,7 @@ import { getParticipantCount } from '../../../base/participants/functions'; |
|
|
|
|
import { connect } from '../../../base/redux'; |
|
|
|
|
import { E2EELabel } from '../../../e2ee'; |
|
|
|
|
import { LocalRecordingLabel } from '../../../local-recording'; |
|
|
|
|
import { RecordingLabel } from '../../../recording'; |
|
|
|
|
import { getSessionStatusToShow, RecordingLabel } from '../../../recording'; |
|
|
|
|
import { isToolboxVisible } from '../../../toolbox/functions.web'; |
|
|
|
|
import { TranscribingLabel } from '../../../transcribing'; |
|
|
|
|
import { VideoQualityLabel } from '../../../video-quality'; |
|
|
|
@ -38,6 +38,11 @@ type Props = { |
|
|
|
|
*/ |
|
|
|
|
_hideConferenceTimer: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Whether the recording label should be shown or not. |
|
|
|
|
*/ |
|
|
|
|
_hideRecordingLabel: boolean, |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Whether the participant count should be shown or not. |
|
|
|
|
*/ |
|
|
|
@ -52,7 +57,20 @@ type Props = { |
|
|
|
|
/** |
|
|
|
|
* Indicates whether the component should be visible or not. |
|
|
|
|
*/ |
|
|
|
|
_visible: boolean |
|
|
|
|
_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; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -66,29 +84,46 @@ function ConferenceInfo(props: Props) { |
|
|
|
|
_hideConferenceNameAndTimer, |
|
|
|
|
_hideConferenceTimer, |
|
|
|
|
_showParticipantCount, |
|
|
|
|
_hideRecordingLabel, |
|
|
|
|
_subject, |
|
|
|
|
_fullWidth, |
|
|
|
|
_visible |
|
|
|
|
_visible, |
|
|
|
|
_recordingLabel |
|
|
|
|
} = props; |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className = { `subject ${_visible ? 'visible' : ''}` }> |
|
|
|
|
<div className = { `subject-info-container${_fullWidth ? ' subject-info-container--full-width' : ''}` }> |
|
|
|
|
{ |
|
|
|
|
!_hideConferenceNameAndTimer |
|
|
|
|
&& <div className = 'subject-info'> |
|
|
|
|
{ _subject && <span className = 'subject-text'>{ _subject }</span>} |
|
|
|
|
{ !_hideConferenceTimer && <ConferenceTimer /> } |
|
|
|
|
</div> |
|
|
|
|
<div className = { `subject ${_recordingLabel ? 'recording' : ''} ${_visible ? 'visible' : ''}` }> |
|
|
|
|
<div |
|
|
|
|
className = { `subject-info-container${_fullWidth ? ' subject-info-container--full-width' : ''}` } |
|
|
|
|
id = 'subject-container'> |
|
|
|
|
{!_hideRecordingLabel && <div |
|
|
|
|
className = 'show-always' |
|
|
|
|
id = 'rec-container' |
|
|
|
|
// eslint-disable-next-line react-native/no-inline-styles
|
|
|
|
|
style = {{ |
|
|
|
|
marginLeft: !_recordingLabel || _visible ? 0 : getLeftMargin() |
|
|
|
|
}}> |
|
|
|
|
<RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } /> |
|
|
|
|
<RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } /> |
|
|
|
|
<LocalRecordingLabel /> |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
{ _showParticipantCount && <ParticipantsCount /> } |
|
|
|
|
<E2EELabel /> |
|
|
|
|
<RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } /> |
|
|
|
|
<RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } /> |
|
|
|
|
<LocalRecordingLabel /> |
|
|
|
|
<TranscribingLabel /> |
|
|
|
|
<VideoQualityLabel /> |
|
|
|
|
<InsecureRoomNameLabel /> |
|
|
|
|
<div |
|
|
|
|
className = 'subject-details-container' |
|
|
|
|
id = 'subject-details-container'> |
|
|
|
|
{ |
|
|
|
|
!_hideConferenceNameAndTimer |
|
|
|
|
&& <div className = 'subject-info'> |
|
|
|
|
{ _subject && <span className = 'subject-text'>{ _subject }</span>} |
|
|
|
|
{ !_hideConferenceTimer && <ConferenceTimer /> } |
|
|
|
|
</div> |
|
|
|
|
} |
|
|
|
|
{ _showParticipantCount && <ParticipantsCount /> } |
|
|
|
|
<E2EELabel /> |
|
|
|
|
<TranscribingLabel /> |
|
|
|
|
<VideoQualityLabel /> |
|
|
|
|
<InsecureRoomNameLabel /> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
); |
|
|
|
@ -109,16 +144,30 @@ function ConferenceInfo(props: Props) { |
|
|
|
|
*/ |
|
|
|
|
function _mapStateToProps(state) { |
|
|
|
|
const participantCount = getParticipantCount(state); |
|
|
|
|
const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config']; |
|
|
|
|
const { |
|
|
|
|
hideConferenceTimer, |
|
|
|
|
hideConferenceSubject, |
|
|
|
|
hideParticipantsStats, |
|
|
|
|
hideRecordingLabel |
|
|
|
|
} = state['features/base/config']; |
|
|
|
|
const { clientWidth } = state['features/base/responsive-ui']; |
|
|
|
|
|
|
|
|
|
const fileRecordingStatus = getSessionStatusToShow(state, JitsiRecordingConstants.mode.FILE); |
|
|
|
|
const streamRecordingStatus = getSessionStatusToShow(state, JitsiRecordingConstants.mode.STREAM); |
|
|
|
|
const isFileRecording = fileRecordingStatus ? fileRecordingStatus !== JitsiRecordingConstants.status.OFF : false; |
|
|
|
|
const isStreamRecording = streamRecordingStatus |
|
|
|
|
? streamRecordingStatus !== JitsiRecordingConstants.status.OFF : false; |
|
|
|
|
const { isEngaged } = state['features/local-recording']; |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
_hideConferenceNameAndTimer: clientWidth < 300, |
|
|
|
|
_hideConferenceTimer: Boolean(hideConferenceTimer), |
|
|
|
|
_hideRecordingLabel: hideRecordingLabel, |
|
|
|
|
_fullWidth: state['features/video-layout'].tileViewEnabled, |
|
|
|
|
_showParticipantCount: participantCount > 2 && !hideParticipantsStats, |
|
|
|
|
_subject: hideConferenceSubject ? '' : getConferenceName(state), |
|
|
|
|
_visible: isToolboxVisible(state) |
|
|
|
|
_visible: isToolboxVisible(state), |
|
|
|
|
_recordingLabel: (isFileRecording || isStreamRecording || isEngaged) && !hideRecordingLabel |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|