|
@@ -1,4 +1,4 @@
|
1
|
|
-/* global APP, $, config, interfaceConfig */
|
|
1
|
+/* global APP, config, interfaceConfig */
|
2
|
2
|
/*
|
3
|
3
|
* Copyright @ 2015 Atlassian Pty Ltd
|
4
|
4
|
*
|
|
@@ -192,8 +192,7 @@ function isStartingStatus(status) {
|
192
|
192
|
|
193
|
193
|
/**
|
194
|
194
|
* Manages the recording user interface and user experience.
|
195
|
|
- * @type {{init, initRecordingButton, showRecordingButton, updateRecordingState,
|
196
|
|
- * updateRecordingUI, checkAutoRecord}}
|
|
195
|
+ * @type {{init, updateRecordingState, updateRecordingUI, checkAutoRecord}}
|
197
|
196
|
*/
|
198
|
197
|
const Recording = {
|
199
|
198
|
/**
|
|
@@ -215,13 +214,6 @@ const Recording = {
|
215
|
214
|
Object.assign(this, RECORDING_TRANSLATION_KEYS);
|
216
|
215
|
}
|
217
|
216
|
|
218
|
|
- // XXX Due to the React-ification of Toolbox, the HTMLElement with id
|
219
|
|
- // toolbar_button_record may not exist yet.
|
220
|
|
- $(document).on(
|
221
|
|
- 'click',
|
222
|
|
- '#toolbar_button_record',
|
223
|
|
- ev => this._onToolbarButtonClick(ev));
|
224
|
|
-
|
225
|
217
|
this.eventEmitter.on(UIEvents.TOGGLE_RECORDING,
|
226
|
218
|
() => this._onToolbarButtonClick());
|
227
|
219
|
|
|
@@ -242,28 +234,6 @@ const Recording = {
|
242
|
234
|
}
|
243
|
235
|
},
|
244
|
236
|
|
245
|
|
- /**
|
246
|
|
- * Initialise the recording button.
|
247
|
|
- */
|
248
|
|
- initRecordingButton() {
|
249
|
|
- const selector = $('#toolbar_button_record');
|
250
|
|
-
|
251
|
|
- selector.addClass(this.baseClass);
|
252
|
|
- selector.attr('data-i18n', `[content]${this.recordingButtonTooltip}`);
|
253
|
|
- APP.translation.translateElement(selector);
|
254
|
|
- },
|
255
|
|
-
|
256
|
|
- /**
|
257
|
|
- * Shows or hides the 'recording' button.
|
258
|
|
- * @param show {true} to show the recording button, {false} to hide it
|
259
|
|
- */
|
260
|
|
- showRecordingButton(show) {
|
261
|
|
- const shouldShow = show && _isRecordingButtonEnabled();
|
262
|
|
- const id = 'toolbar_button_record';
|
263
|
|
-
|
264
|
|
- UIUtil.setVisible(id, shouldShow);
|
265
|
|
- },
|
266
|
|
-
|
267
|
237
|
/**
|
268
|
238
|
* Updates the recording state UI.
|
269
|
239
|
* @param recordingState gives us the current recording state
|
|
@@ -304,7 +274,6 @@ const Recording = {
|
304
|
274
|
showSpinner: recordingState === JitsiRecordingStatus.RETRYING
|
305
|
275
|
};
|
306
|
276
|
|
307
|
|
- this._setToolbarButtonToggled(true);
|
308
|
277
|
isRecording = true;
|
309
|
278
|
|
310
|
279
|
break;
|
|
@@ -330,8 +299,6 @@ const Recording = {
|
330
|
299
|
: this.recordingOffKey
|
331
|
300
|
};
|
332
|
301
|
|
333
|
|
- this._setToolbarButtonToggled(false);
|
334
|
|
-
|
335
|
302
|
setTimeout(() => {
|
336
|
303
|
APP.store.dispatch(hideRecordingLabel());
|
337
|
304
|
}, 5000);
|
|
@@ -345,8 +312,6 @@ const Recording = {
|
345
|
312
|
key: this.recordingPendingKey
|
346
|
313
|
};
|
347
|
314
|
|
348
|
|
- this._setToolbarButtonToggled(false);
|
349
|
|
-
|
350
|
315
|
break;
|
351
|
316
|
}
|
352
|
317
|
|
|
@@ -356,8 +321,6 @@ const Recording = {
|
356
|
321
|
key: this.recordingErrorKey
|
357
|
322
|
};
|
358
|
323
|
|
359
|
|
- this._setToolbarButtonToggled(false);
|
360
|
|
-
|
361
|
324
|
break;
|
362
|
325
|
}
|
363
|
326
|
|
|
@@ -488,16 +451,6 @@ const Recording = {
|
488
|
451
|
});
|
489
|
452
|
}
|
490
|
453
|
}
|
491
|
|
- },
|
492
|
|
-
|
493
|
|
- /**
|
494
|
|
- * Sets the toggled state of the recording toolbar button.
|
495
|
|
- *
|
496
|
|
- * @param {boolean} isToggled indicates if the button should be toggled
|
497
|
|
- * or not
|
498
|
|
- */
|
499
|
|
- _setToolbarButtonToggled(isToggled) {
|
500
|
|
- $('#toolbar_button_record').toggleClass('toggled', isToggled);
|
501
|
454
|
}
|
502
|
455
|
};
|
503
|
456
|
|