|
|
@@ -8,7 +8,7 @@ import { getParticipantCount } from '../../../base/participants/functions';
|
|
8
|
8
|
import { connect } from '../../../base/redux';
|
|
9
|
9
|
import { E2EELabel } from '../../../e2ee';
|
|
10
|
10
|
import { LocalRecordingLabel } from '../../../local-recording';
|
|
11
|
|
-import { RecordingLabel } from '../../../recording';
|
|
|
11
|
+import { getSessionStatusToShow, RecordingLabel } from '../../../recording';
|
|
12
|
12
|
import { isToolboxVisible } from '../../../toolbox/functions.web';
|
|
13
|
13
|
import { TranscribingLabel } from '../../../transcribing';
|
|
14
|
14
|
import { VideoQualityLabel } from '../../../video-quality';
|
|
|
@@ -38,6 +38,11 @@ type Props = {
|
|
38
|
38
|
*/
|
|
39
|
39
|
_hideConferenceTimer: boolean,
|
|
40
|
40
|
|
|
|
41
|
+ /**
|
|
|
42
|
+ * Whether the recording label should be shown or not.
|
|
|
43
|
+ */
|
|
|
44
|
+ _hideRecordingLabel: boolean,
|
|
|
45
|
+
|
|
41
|
46
|
/**
|
|
42
|
47
|
* Whether the participant count should be shown or not.
|
|
43
|
48
|
*/
|
|
|
@@ -52,7 +57,20 @@ type Props = {
|
|
52
|
57
|
/**
|
|
53
|
58
|
* Indicates whether the component should be visible or not.
|
|
54
|
59
|
*/
|
|
55
|
|
- _visible: boolean
|
|
|
60
|
+ _visible: boolean,
|
|
|
61
|
+
|
|
|
62
|
+ /**
|
|
|
63
|
+ * Whether or not the recording label is visible.
|
|
|
64
|
+ */
|
|
|
65
|
+ _recordingLabel: boolean
|
|
|
66
|
+};
|
|
|
67
|
+
|
|
|
68
|
+const getLeftMargin = () => {
|
|
|
69
|
+ const subjectContainerWidth = document.getElementById('subject-container')?.clientWidth ?? 0;
|
|
|
70
|
+ const recContainerWidth = document.getElementById('rec-container')?.clientWidth ?? 0;
|
|
|
71
|
+ const subjectDetailsContainer = document.getElementById('subject-details-container')?.clientWidth ?? 0;
|
|
|
72
|
+
|
|
|
73
|
+ return (subjectContainerWidth - recContainerWidth - subjectDetailsContainer) / 2;
|
|
56
|
74
|
};
|
|
57
|
75
|
|
|
58
|
76
|
/**
|
|
|
@@ -66,29 +84,46 @@ function ConferenceInfo(props: Props) {
|
|
66
|
84
|
_hideConferenceNameAndTimer,
|
|
67
|
85
|
_hideConferenceTimer,
|
|
68
|
86
|
_showParticipantCount,
|
|
|
87
|
+ _hideRecordingLabel,
|
|
69
|
88
|
_subject,
|
|
70
|
89
|
_fullWidth,
|
|
71
|
|
- _visible
|
|
|
90
|
+ _visible,
|
|
|
91
|
+ _recordingLabel
|
|
72
|
92
|
} = props;
|
|
73
|
93
|
|
|
74
|
94
|
return (
|
|
75
|
|
- <div className = { `subject ${_visible ? 'visible' : ''}` }>
|
|
76
|
|
- <div className = { `subject-info-container${_fullWidth ? ' subject-info-container--full-width' : ''}` }>
|
|
77
|
|
- {
|
|
78
|
|
- !_hideConferenceNameAndTimer
|
|
79
|
|
- && <div className = 'subject-info'>
|
|
80
|
|
- { _subject && <span className = 'subject-text'>{ _subject }</span>}
|
|
81
|
|
- { !_hideConferenceTimer && <ConferenceTimer /> }
|
|
82
|
|
- </div>
|
|
|
95
|
+ <div className = { `subject ${_recordingLabel ? 'recording' : ''} ${_visible ? 'visible' : ''}` }>
|
|
|
96
|
+ <div
|
|
|
97
|
+ className = { `subject-info-container${_fullWidth ? ' subject-info-container--full-width' : ''}` }
|
|
|
98
|
+ id = 'subject-container'>
|
|
|
99
|
+ {!_hideRecordingLabel && <div
|
|
|
100
|
+ className = 'show-always'
|
|
|
101
|
+ id = 'rec-container'
|
|
|
102
|
+ // eslint-disable-next-line react-native/no-inline-styles
|
|
|
103
|
+ style = {{
|
|
|
104
|
+ marginLeft: !_recordingLabel || _visible ? 0 : getLeftMargin()
|
|
|
105
|
+ }}>
|
|
|
106
|
+ <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />
|
|
|
107
|
+ <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />
|
|
|
108
|
+ <LocalRecordingLabel />
|
|
|
109
|
+ </div>
|
|
83
|
110
|
}
|
|
84
|
|
- { _showParticipantCount && <ParticipantsCount /> }
|
|
85
|
|
- <E2EELabel />
|
|
86
|
|
- <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />
|
|
87
|
|
- <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />
|
|
88
|
|
- <LocalRecordingLabel />
|
|
89
|
|
- <TranscribingLabel />
|
|
90
|
|
- <VideoQualityLabel />
|
|
91
|
|
- <InsecureRoomNameLabel />
|
|
|
111
|
+ <div
|
|
|
112
|
+ className = 'subject-details-container'
|
|
|
113
|
+ id = 'subject-details-container'>
|
|
|
114
|
+ {
|
|
|
115
|
+ !_hideConferenceNameAndTimer
|
|
|
116
|
+ && <div className = 'subject-info'>
|
|
|
117
|
+ { _subject && <span className = 'subject-text'>{ _subject }</span>}
|
|
|
118
|
+ { !_hideConferenceTimer && <ConferenceTimer /> }
|
|
|
119
|
+ </div>
|
|
|
120
|
+ }
|
|
|
121
|
+ { _showParticipantCount && <ParticipantsCount /> }
|
|
|
122
|
+ <E2EELabel />
|
|
|
123
|
+ <TranscribingLabel />
|
|
|
124
|
+ <VideoQualityLabel />
|
|
|
125
|
+ <InsecureRoomNameLabel />
|
|
|
126
|
+ </div>
|
|
92
|
127
|
</div>
|
|
93
|
128
|
</div>
|
|
94
|
129
|
);
|
|
|
@@ -109,16 +144,30 @@ function ConferenceInfo(props: Props) {
|
|
109
|
144
|
*/
|
|
110
|
145
|
function _mapStateToProps(state) {
|
|
111
|
146
|
const participantCount = getParticipantCount(state);
|
|
112
|
|
- const { hideConferenceTimer, hideConferenceSubject, hideParticipantsStats } = state['features/base/config'];
|
|
|
147
|
+ const {
|
|
|
148
|
+ hideConferenceTimer,
|
|
|
149
|
+ hideConferenceSubject,
|
|
|
150
|
+ hideParticipantsStats,
|
|
|
151
|
+ hideRecordingLabel
|
|
|
152
|
+ } = state['features/base/config'];
|
|
113
|
153
|
const { clientWidth } = state['features/base/responsive-ui'];
|
|
114
|
154
|
|
|
|
155
|
+ const fileRecordingStatus = getSessionStatusToShow(state, JitsiRecordingConstants.mode.FILE);
|
|
|
156
|
+ const streamRecordingStatus = getSessionStatusToShow(state, JitsiRecordingConstants.mode.STREAM);
|
|
|
157
|
+ const isFileRecording = fileRecordingStatus ? fileRecordingStatus !== JitsiRecordingConstants.status.OFF : false;
|
|
|
158
|
+ const isStreamRecording = streamRecordingStatus
|
|
|
159
|
+ ? streamRecordingStatus !== JitsiRecordingConstants.status.OFF : false;
|
|
|
160
|
+ const { isEngaged } = state['features/local-recording'];
|
|
|
161
|
+
|
|
115
|
162
|
return {
|
|
116
|
163
|
_hideConferenceNameAndTimer: clientWidth < 300,
|
|
117
|
164
|
_hideConferenceTimer: Boolean(hideConferenceTimer),
|
|
|
165
|
+ _hideRecordingLabel: hideRecordingLabel,
|
|
118
|
166
|
_fullWidth: state['features/video-layout'].tileViewEnabled,
|
|
119
|
167
|
_showParticipantCount: participantCount > 2 && !hideParticipantsStats,
|
|
120
|
168
|
_subject: hideConferenceSubject ? '' : getConferenceName(state),
|
|
121
|
|
- _visible: isToolboxVisible(state)
|
|
|
169
|
+ _visible: isToolboxVisible(state),
|
|
|
170
|
+ _recordingLabel: (isFileRecording || isStreamRecording || isEngaged) && !hideRecordingLabel
|
|
122
|
171
|
};
|
|
123
|
172
|
}
|
|
124
|
173
|
|