|
@@ -30,7 +30,7 @@ import BottomToolbar from '../toolbars/BottomToolbar';
|
30
|
30
|
*/
|
31
|
31
|
function _isRecordingButtonEnabled() {
|
32
|
32
|
return interfaceConfig.TOOLBAR_BUTTONS.indexOf("recording") !== -1
|
33
|
|
- && config.enableRecording;
|
|
33
|
+ && config.enableRecording && APP.conference.isRecordingSupported();
|
34
|
34
|
}
|
35
|
35
|
|
36
|
36
|
/**
|
|
@@ -211,7 +211,7 @@ var Status = {
|
211
|
211
|
/**
|
212
|
212
|
* Manages the recording user interface and user experience.
|
213
|
213
|
* @type {{init, initRecordingButton, showRecordingButton, updateRecordingState,
|
214
|
|
- * setRecordingButtonState, checkAutoRecord}}
|
|
214
|
+ * updateRecordingUI, checkAutoRecord}}
|
215
|
215
|
*/
|
216
|
216
|
var Recording = {
|
217
|
217
|
/**
|
|
@@ -219,8 +219,8 @@ var Recording = {
|
219
|
219
|
*/
|
220
|
220
|
init (emitter, recordingType) {
|
221
|
221
|
this.eventEmitter = emitter;
|
222
|
|
- // Use recorder states directly from the library.
|
223
|
|
- this.currentState = Status.UNAVAILABLE;
|
|
222
|
+
|
|
223
|
+ this.updateRecordingState(APP.conference.getRecordingState());
|
224
|
224
|
|
225
|
225
|
this.initRecordingButton(recordingType);
|
226
|
226
|
|
|
@@ -326,17 +326,17 @@ var Recording = {
|
326
|
326
|
return;
|
327
|
327
|
|
328
|
328
|
// If there's no state change, we ignore the update.
|
329
|
|
- if (this.currentState === recordingState)
|
|
329
|
+ if (!recordingState || this.currentState === recordingState)
|
330
|
330
|
return;
|
331
|
331
|
|
332
|
|
- this.setRecordingButtonState(recordingState);
|
|
332
|
+ this.updateRecordingUI(recordingState);
|
333
|
333
|
},
|
334
|
334
|
|
335
|
335
|
/**
|
336
|
336
|
* Sets the state of the recording button.
|
337
|
337
|
* @param recordingState gives us the current recording state
|
338
|
338
|
*/
|
339
|
|
- setRecordingButtonState (recordingState) {
|
|
339
|
+ updateRecordingUI (recordingState) {
|
340
|
340
|
let buttonSelector = $('#toolbar_button_record');
|
341
|
341
|
let labelSelector = $('#recordingLabel');
|
342
|
342
|
|