|
@@ -3,6 +3,7 @@ import React, { Component } from 'react';
|
3
|
3
|
import { connect } from 'react-redux';
|
4
|
4
|
|
5
|
5
|
import { translate } from '../../base/i18n';
|
|
6
|
+import { JitsiRecordingStatus } from '../../base/lib-jitsi-meet';
|
6
|
7
|
|
7
|
8
|
/**
|
8
|
9
|
* Implements a React {@link Component} which displays the current state of
|
|
@@ -25,6 +26,11 @@ class RecordingLabel extends Component {
|
25
|
26
|
*/
|
26
|
27
|
_filmstripVisible: PropTypes.bool,
|
27
|
28
|
|
|
29
|
+ /**
|
|
30
|
+ * Whether or not the conference is currently being recorded.
|
|
31
|
+ */
|
|
32
|
+ _isRecording: PropTypes.bool,
|
|
33
|
+
|
28
|
34
|
/**
|
29
|
35
|
* An object to describe the {@code RecordingLabel} content. If no
|
30
|
36
|
* translation key to display is specified, the label will apply CSS to
|
|
@@ -87,12 +93,13 @@ class RecordingLabel extends Component {
|
87
|
93
|
* @returns {ReactElement}
|
88
|
94
|
*/
|
89
|
95
|
render() {
|
90
|
|
- const { _labelDisplayConfiguration } = this.props;
|
|
96
|
+ const { _isRecording, _labelDisplayConfiguration } = this.props;
|
91
|
97
|
const { centered, key, showSpinner } = _labelDisplayConfiguration || {};
|
92
|
98
|
|
93
|
99
|
const isVisible = Boolean(key);
|
94
|
100
|
const rootClassName = [
|
95
|
101
|
'video-state-indicator centeredVideoLabel',
|
|
102
|
+ _isRecording ? 'is-recording' : '',
|
96
|
103
|
isVisible ? 'show-inline' : '',
|
97
|
104
|
centered ? '' : 'moveToCorner',
|
98
|
105
|
this.state.filmstripBecomingVisible ? 'opening' : '',
|
|
@@ -101,19 +108,24 @@ class RecordingLabel extends Component {
|
101
|
108
|
].join(' ');
|
102
|
109
|
|
103
|
110
|
return (
|
104
|
|
- <span
|
|
111
|
+ <div
|
105
|
112
|
className = { rootClassName }
|
106
|
113
|
id = 'recordingLabel'>
|
107
|
|
- <span id = 'recordingLabelText'>
|
108
|
|
- { this.props.t(key) }
|
109
|
|
- </span>
|
110
|
|
- { showSpinner
|
111
|
|
- ? <img
|
|
114
|
+ { _isRecording
|
|
115
|
+ ? <div className = 'recording-icon'>
|
|
116
|
+ <div className = 'recording-icon-background' />
|
|
117
|
+ <i className = 'icon-rec' />
|
|
118
|
+ </div>
|
|
119
|
+ : <div id = 'recordingLabelText'>
|
|
120
|
+ { this.props.t(key) }
|
|
121
|
+ </div> }
|
|
122
|
+ { !_isRecording
|
|
123
|
+ && showSpinner
|
|
124
|
+ && <img
|
112
|
125
|
className = 'recordingSpinner'
|
113
|
126
|
id = 'recordingSpinner'
|
114
|
|
- src = 'images/spin.svg' />
|
115
|
|
- : null }
|
116
|
|
- </span>
|
|
127
|
+ src = 'images/spin.svg' /> }
|
|
128
|
+ </div>
|
117
|
129
|
);
|
118
|
130
|
}
|
119
|
131
|
}
|
|
@@ -126,27 +138,20 @@ class RecordingLabel extends Component {
|
126
|
138
|
* @private
|
127
|
139
|
* @returns {{
|
128
|
140
|
* _filmstripVisible: boolean,
|
|
141
|
+ * _isRecording: boolean,
|
129
|
142
|
* _labelDisplayConfiguration: Object
|
130
|
143
|
* }}
|
131
|
144
|
*/
|
132
|
145
|
function _mapStateToProps(state) {
|
133
|
146
|
const { visible } = state['features/filmstrip'];
|
134
|
|
- const { labelDisplayConfiguration } = state['features/recording'];
|
|
147
|
+ const {
|
|
148
|
+ labelDisplayConfiguration,
|
|
149
|
+ recordingState
|
|
150
|
+ } = state['features/recording'];
|
135
|
151
|
|
136
|
152
|
return {
|
137
|
|
- /**
|
138
|
|
- * Whether or not the filmstrip is currently set to be displayed.
|
139
|
|
- *
|
140
|
|
- * @type {boolean}
|
141
|
|
- */
|
142
|
153
|
_filmstripVisible: visible,
|
143
|
|
-
|
144
|
|
- /**
|
145
|
|
- * An object describing how {@code RecordingLabel} should display its
|
146
|
|
- * contents.
|
147
|
|
- *
|
148
|
|
- * @type {Object}
|
149
|
|
- */
|
|
154
|
+ _isRecording: recordingState === JitsiRecordingStatus.ON,
|
150
|
155
|
_labelDisplayConfiguration: labelDisplayConfiguration
|
151
|
156
|
};
|
152
|
157
|
}
|