Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Fix recorder state and moderator restart
yanasc07060c9cd73
diff --git a/conference.js b/conference.jsindex b6b33d4914..e48f28814b 100644--- a/conference.js+++ b/conference.js@@ -460,6 +460,18 @@ export default {return this._room&& this._room.myUserId();},+ /**+ * Indicates if recording is supported in this conference.+ */+ isRecordingSupported() {+ return this._room && this._room.isRecordingSupported();+ },+ /**+ * Returns the recording state or undefined if the room is not defined.+ */+ getRecordingState() {+ return (this._room) ? this._room.getRecordingState() : undefined;+ },/*** Will be filled with values only when config.debug is enabled.* Its used by torture to check audio levels.diff --git a/modules/UI/recording/Recording.js b/modules/UI/recording/Recording.jsindex 53e9ac9498..9d1511ab26 100644--- a/modules/UI/recording/Recording.js+++ b/modules/UI/recording/Recording.js@@ -30,7 +30,7 @@ import BottomToolbar from '../toolbars/BottomToolbar';*/function _isRecordingButtonEnabled() {return interfaceConfig.TOOLBAR_BUTTONS.indexOf("recording") !== -1- && config.enableRecording;+ && config.enableRecording && APP.conference.isRecordingSupported();}/**@@ -211,7 +211,7 @@ var Status = {/*** Manages the recording user interface and user experience.* @type {{init, initRecordingButton, showRecordingButton, updateRecordingState,- * setRecordingButtonState, checkAutoRecord}}+ * updateRecordingUI, checkAutoRecord}}*/var Recording = {/**@@ -219,8 +219,8 @@ var Recording = {*/init (emitter, recordingType) {this.eventEmitter = emitter;- // Use recorder states directly from the library.- this.currentState = Status.UNAVAILABLE;++ this.updateRecordingState(APP.conference.getRecordingState());this.initRecordingButton(recordingType);@@ -326,17 +326,17 @@ var Recording = {return;// If there's no state change, we ignore the update.- if (this.currentState === recordingState)+ if (!recordingState || this.currentState === recordingState)return;- this.setRecordingButtonState(recordingState);+ this.updateRecordingUI(recordingState);},/*** Sets the state of the recording button.* @param recordingState gives us the current recording state*/- setRecordingButtonState (recordingState) {+ updateRecordingUI (recordingState) {let buttonSelector = $('#toolbar_button_record');let labelSelector = $('#recordingLabel');