Ver código fonte

Merge pull request #564 from jitsi/recording-related-work-in-progress

Recording related UI modifications.
master
damencho 9 anos atrás
pai
commit
24896634f6

+ 5
- 11
conference.js Ver arquivo

@@ -567,7 +567,7 @@ export default {
567 567
 
568 568
     _getConferenceOptions() {
569 569
         let options = config;
570
-        if(config.enableRecording) {
570
+        if(config.enableRecording && !config.recordingType) {
571 571
             options.recordingType = (config.hosts &&
572 572
                 (typeof config.hosts.jirecon != "undefined"))?
573 573
                 "jirecon" : "colibri";
@@ -848,7 +848,8 @@ export default {
848 848
             APP.UI.changeDisplayName(id, displayName);
849 849
         });
850 850
 
851
-        room.on(ConferenceEvents.RECORDING_STATE_CHANGED, (status, error) => {
851
+        room.on(ConferenceEvents.RECORDER_STATE_CHANGED, (status, error) => {
852
+            console.log("Received recorder status change: ", status, error);
852 853
             if(status == "error") {
853 854
                 console.error(error);
854 855
                 return;
@@ -1008,15 +1009,8 @@ export default {
1008 1009
 
1009 1010
 
1010 1011
         // Starts or stops the recording for the conference.
1011
-        APP.UI.addListener(UIEvents.RECORDING_TOGGLE, (predefinedToken) => {
1012
-            if (predefinedToken) {
1013
-                room.toggleRecording({token: predefinedToken});
1014
-                return;
1015
-            }
1016
-            APP.UI.requestRecordingToken().then((token) => {
1017
-                room.toggleRecording({token: token});
1018
-            });
1019
-
1012
+        APP.UI.addListener(UIEvents.RECORDING_TOGGLED, (options) => {
1013
+            room.toggleRecording(options);
1020 1014
         });
1021 1015
 
1022 1016
         APP.UI.addListener(UIEvents.SUBJECT_CHANGED, (topic) => {

+ 1
- 16
css/main.css Ver arquivo

@@ -129,21 +129,6 @@ html, body{
129 129
     -moz-transition: all .5s ease-in-out;
130 130
     transition: all .5s ease-in-out;
131 131
 }
132
-/*#ffde00*/
133
-#toolbar_button_record.active {
134
-    -webkit-text-shadow:    -1px 0 10px #00ccff,
135
-    0 1px 10px #00ccff,
136
-    1px 0 10px #00ccff,
137
-    0 -1px 10px #00ccff;
138
-    -moz-text-shadow:   1px 0 10px #00ccff,
139
-    0 1px 10px #00ccff,
140
-    1px 0 10px #00ccff,
141
-    0 -1px 10px #00ccff;
142
-    text-shadow:    -1px 0 10px #00ccff,
143
-    0 1px 10px #00ccff,
144
-    1px 0 10px #00ccff,
145
-    0 -1px 10px #00ccff;
146
-}
147 132
 
148 133
 a.button:hover,
149 134
 a.bottomToolbarButton:hover {
@@ -298,7 +283,7 @@ div.feedbackButton:hover {
298 283
 }
299 284
 
300 285
 .active {
301
-    color: #00ccff;
286
+    background-color: #00ccff;
302 287
 }
303 288
 
304 289
 .bottomToolbar_span>span {

+ 30
- 0
css/videolayout_default.css Ver arquivo

@@ -488,4 +488,34 @@
488 488
     padding: 10px;
489 489
     color: rgba(255,255,255,.5);
490 490
     z-index: 10000;
491
+}
492
+
493
+.centeredVideoLabel {
494
+    display: none;
495
+    position: absolute;
496
+    bottom: 45%;
497
+    top: auto;
498
+    right: auto;
499
+    left: auto;
500
+    line-height: 28px;
501
+    height: 28px;
502
+    width: auto;
503
+    padding: 5px;
504
+    margin-right: auto;
505
+    margin-left: auto;
506
+    background: rgba(0,0,0,.5);
507
+    color: #FFF;
508
+    z-index: 10000;
509
+    border-radius: 4px;
510
+    -webkit-transition: all 2s 2s linear;
511
+    transition: all 2s 2s linear;
512
+}
513
+
514
+.moveToCorner {
515
+    top: 5px;
516
+    right: 5px;
517
+    margin-right: 0px;
518
+    margin-left: auto;
519
+    background: rgba(0,0,0,.3);
520
+    color: rgba(255,255,255,.5);
491 521
 }

+ 2
- 1
index.html Ver arquivo

@@ -116,7 +116,7 @@
116 116
                     </span>
117 117
                     <a class="button icon-microphone" id="toolbar_button_mute" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="mutePopover" data-i18n="[content]toolbar.mute" content="Mute / Unmute"></a>
118 118
                     <a class="button icon-camera" id="toolbar_button_camera" data-container="body" data-toggle="popover" data-placement="bottom" shortcut="toggleVideoPopover" data-i18n="[content]toolbar.videomute" content="Start / stop camera"></a>
119
-                    <a class="button icon-recEnable" id="toolbar_button_record" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.record" content="Record" style="display: none"></a>
119
+                    <a class="button" id="toolbar_button_record" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.record" content="Record" style="display: none"></a>
120 120
                     <a class="button icon-security" id="toolbar_button_security" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.lock" content="Lock / unlock room"></a>
121 121
                     <a class="button icon-link" id="toolbar_button_link" data-container="body" data-toggle="popover" data-placement="bottom" data-i18n="[content]toolbar.invite" content="Invite others"></a>
122 122
                     <a class="button icon-chat" id="toolbar_button_chat" data-container="body" data-toggle="popover" shortcut="toggleChatPopover" data-placement="bottom" data-i18n="[content]toolbar.chat" content="Open / close chat">
@@ -154,6 +154,7 @@
154 154
                 </div>
155 155
                 <span id="videoConnectionMessage"></span>
156 156
                 <span id="videoResolutionLabel">HD</span>
157
+                <span id="recordingLabel" class="centeredVideoLabel"></span>
157 158
             </div>
158 159
 
159 160
             <div id="remoteVideos">

+ 22
- 5
lang/main.json Ver arquivo

@@ -51,7 +51,7 @@
51 51
         "mute": "Mute / Unmute",
52 52
         "videomute": "Start / stop camera",
53 53
         "authenticate": "Authenticate",
54
-        "record": "Record",
54
+        "record": "Toggle recording",
55 55
         "lock": "Lock / unlock room",
56 56
         "invite": "Invite others",
57 57
         "chat": "Open / close chat",
@@ -179,6 +179,7 @@
179 179
         "joinAgain": "Join again",
180 180
         "Share": "Share",
181 181
         "Save": "Save",
182
+        "recording": "Recording",
182 183
         "recordingToken": "Enter recording token",
183 184
         "Dial": "Dial",
184 185
         "sipMsg": "Enter SIP number",
@@ -206,7 +207,14 @@
206 207
         "firefoxExtensionPrompt": "You need to install a Firefox extension in order to use screen sharing. Please try again after you <a href='__url__'>get it from here</a>!",
207 208
         "feedbackQuestion": "How was your call?",
208 209
         "thankYou": "Thank you for using __appName__!",
209
-        "sorryFeedback": "We're sorry to hear that. Would you like to tell us more?"
210
+        "sorryFeedback": "We're sorry to hear that. Would you like to tell us more?",
211
+        "liveStreaming": "Live Streaming",
212
+        "streamKey": "Stream name/key",
213
+        "startLiveStreaming": "Start live streaming",
214
+        "stopStreamingWarning": "Are you sure you would like to stop the live streaming?",
215
+        "stopRecordingWarning": "Are you sure you would like to stop the recording?",
216
+        "stopLiveStreaming": "Stop live streaming",
217
+        "stopRecording": "Stop recording"
210 218
     },
211 219
     "email":
212 220
     {
@@ -254,8 +262,17 @@
254 262
     },
255 263
     "recording":
256 264
     {
257
-        "toaster": "Currently recording!",
258
-        "pending": "Your recording will start as soon as another participant joins",
259
-        "on": "Recording has been started"
265
+        "pending": "Recording waiting for a participant to join...",
266
+        "on": "Recording",
267
+        "off": "Recording stopped",
268
+        "failedToStart": "Recording failed to start"
269
+    },
270
+    "liveStreaming":
271
+    {
272
+        "pending": "Starting Live Stream...",
273
+        "on": "Live Streaming",
274
+        "off": "Live Streaming Stopped",
275
+        "unavailable": "The live streaming service is currently unavailable. Please try again later.",
276
+        "failedToStart": "Live streaming failed to start"
260 277
     }
261 278
 }

+ 9
- 33
modules/UI/UI.js Ver arquivo

@@ -14,6 +14,7 @@ import UIEvents from "../../service/UI/UIEvents";
14 14
 import CQEvents from '../../service/connectionquality/CQEvents';
15 15
 import EtherpadManager from './etherpad/Etherpad';
16 16
 import SharedVideoManager from './shared_video/SharedVideo';
17
+import Recording from "./recording/Recording";
17 18
 
18 19
 import VideoLayout from "./videolayout/VideoLayout";
19 20
 import FilmStrip from "./videolayout/FilmStrip";
@@ -363,12 +364,16 @@ UI.start = function () {
363 364
     bindEvents();
364 365
     sharedVideoManager = new SharedVideoManager(eventEmitter);
365 366
     if (!interfaceConfig.filmStripOnly) {
366
-
367 367
         $("#videospace").mousemove(function () {
368 368
             return ToolbarToggler.showToolbar();
369 369
         });
370 370
         setupToolbars();
371 371
         setupChat();
372
+
373
+        // Initialise the recording module.
374
+        if (config.enableRecording)
375
+            Recording.init(eventEmitter, config.recordingType);
376
+
372 377
         // Display notice message at the top of the toolbar
373 378
         if (config.noticeMessage) {
374 379
             $('#noticeText').text(config.noticeMessage);
@@ -566,15 +571,15 @@ UI.updateLocalRole = function (isModerator) {
566 571
     VideoLayout.showModeratorIndicator();
567 572
 
568 573
     Toolbar.showSipCallButton(isModerator);
569
-    Toolbar.showRecordingButton(isModerator);
570 574
     Toolbar.showSharedVideoButton(isModerator);
575
+    Recording.showRecordingButton(isModerator);
571 576
     SettingsMenu.showStartMutedOptions(isModerator);
572 577
     SettingsMenu.showFollowMeOptions(isModerator);
573 578
 
574 579
     if (isModerator) {
575 580
         messageHandler.notify(null, "notify.me", 'connected', "notify.moderator");
576 581
 
577
-        Toolbar.checkAutoRecord();
582
+        Recording.checkAutoRecord();
578 583
     }
579 584
 };
580 585
 
@@ -977,37 +982,8 @@ UI.requestFeedback = function () {
977 982
     });
978 983
 };
979 984
 
980
-/**
981
- * Request recording token from the user.
982
- * @returns {Promise}
983
- */
984
-UI.requestRecordingToken = function () {
985
-    let msg = APP.translation.generateTranslationHTML("dialog.recordingToken");
986
-    let token = APP.translation.translateString("dialog.token");
987
-    return new Promise(function (resolve, reject) {
988
-        messageHandler.openTwoButtonDialog(
989
-            null, null, null,
990
-            `<h2>${msg}</h2>
991
-             <input name="recordingToken" type="text"
992
-                    data-i18n="[placeholder]dialog.token"
993
-                    placeholder="${token}" autofocus>`,
994
-            false, "dialog.Save",
995
-            function (e, v, m, f) {
996
-                if (v && f.recordingToken) {
997
-                    resolve(UIUtil.escapeHtml(f.recordingToken));
998
-                } else {
999
-                    reject();
1000
-                }
1001
-            },
1002
-            null,
1003
-            function () { },
1004
-            ':input:first'
1005
-        );
1006
-    });
1007
-};
1008
-
1009 985
 UI.updateRecordingState = function (state) {
1010
-    Toolbar.updateRecordingState(state);
986
+    Recording.updateRecordingState(state);
1011 987
 };
1012 988
 
1013 989
 UI.notifyTokenAuthFailed = function () {

+ 289
- 0
modules/UI/recording/Recording.js Ver arquivo

@@ -0,0 +1,289 @@
1
+/* global APP, $, config, interfaceConfig */
2
+/*
3
+ * Copyright @ 2015 Atlassian Pty Ltd
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ *     http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+import UIEvents from "../../../service/UI/UIEvents";
18
+import UIUtil from '../util/UIUtil';
19
+
20
+/**
21
+ * Recording.
22
+ */
23
+let recordingToaster = null;
24
+
25
+function _isRecordingButtonEnabled() {
26
+    return interfaceConfig.TOOLBAR_BUTTONS.indexOf("recording") !== -1
27
+            && config.enableRecording;
28
+}
29
+
30
+/**
31
+ * Request live stream token from the user.
32
+ * @returns {Promise}
33
+ */
34
+function _requestLiveStreamId() {
35
+    let msg = APP.translation.generateTranslationHTML("dialog.liveStreaming");
36
+    let token = APP.translation.translateString("dialog.streamKey");
37
+    return new Promise(function (resolve, reject) {
38
+        APP.UI.messageHandler.openTwoButtonDialog(
39
+            null, null, null,
40
+            `<h2>${msg}</h2>
41
+             <input name="streamId" type="text"
42
+                    data-i18n="[placeholder]dialog.streamKey"
43
+                    placeholder="${token}" autofocus>`,
44
+            false, "dialog.startLiveStreaming",
45
+            function (e, v, m, f) {
46
+                if (v && f.streamId) {
47
+                    resolve(UIUtil.escapeHtml(f.streamId));
48
+                } else {
49
+                    reject();
50
+                }
51
+            },
52
+            null,
53
+            function () { },
54
+            ':input:first'
55
+        );
56
+    });
57
+}
58
+
59
+/**
60
+ * Request recording token from the user.
61
+ * @returns {Promise}
62
+ */
63
+function _requestRecordingToken () {
64
+    let msg = APP.translation.generateTranslationHTML("dialog.recordingToken");
65
+    let token = APP.translation.translateString("dialog.token");
66
+
67
+    return new Promise(function (resolve, reject) {
68
+        APP.UI.messageHandler.openTwoButtonDialog(
69
+            null, null, null,
70
+            `<h2>${msg}</h2>
71
+             <input name="recordingToken" type="text"
72
+                    data-i18n="[placeholder]dialog.token"
73
+                    placeholder="${token}" autofocus>`,
74
+            false, "dialog.Save",
75
+            function (e, v, m, f) {
76
+                if (v && f.recordingToken) {
77
+                    resolve(UIUtil.escapeHtml(f.recordingToken));
78
+                } else {
79
+                    reject();
80
+                }
81
+            },
82
+            null,
83
+            function () { },
84
+            ':input:first'
85
+        );
86
+    });
87
+}
88
+
89
+function _showStopRecordingPrompt (recordingType) {
90
+    var title;
91
+    var message;
92
+    var buttonKey;
93
+    if (recordingType === "jibri") {
94
+        title = "dialog.liveStreaming";
95
+        message = "dialog.stopStreamingWarning";
96
+        buttonKey = "dialog.stopLiveStreaming";
97
+    }
98
+    else {
99
+        title = "dialog.recording";
100
+        message = "dialog.stopRecordingWarning";
101
+        buttonKey = "dialog.stopRecording";
102
+    }
103
+
104
+    return new Promise(function (resolve, reject) {
105
+        APP.UI.messageHandler.openTwoButtonDialog(
106
+            title,
107
+            null,
108
+            message,
109
+            null,
110
+            false,
111
+            buttonKey,
112
+            function(e,v,m,f) {
113
+                if (v) {
114
+                    resolve();
115
+                } else {
116
+                    reject();
117
+                }
118
+            }
119
+        );
120
+    });
121
+}
122
+
123
+function moveToCorner(selector, move) {
124
+    let moveToCornerClass = "moveToCorner";
125
+
126
+    if (move && !selector.hasClass(moveToCornerClass))
127
+        selector.addClass(moveToCornerClass);
128
+    else
129
+        selector.removeClass(moveToCornerClass);
130
+}
131
+
132
+var Recording = {
133
+    /**
134
+     * Initializes the recording UI.
135
+     */
136
+    init (emitter, recordingType) {
137
+        this.eventEmitter = emitter;
138
+
139
+        this.initRecordingButton(recordingType);
140
+    },
141
+
142
+    initRecordingButton(recordingType) {
143
+        let selector = $('#toolbar_button_record');
144
+
145
+        if (recordingType === 'jibri') {
146
+            this.baseClass = "fa fa-play-circle";
147
+            this.recordingOnKey = "liveStreaming.on";
148
+            this.recordingOffKey = "liveStreaming.off";
149
+            this.recordingPendingKey = "liveStreaming.pending";
150
+            this.failedToStartKey = "liveStreaming.failedToStart";
151
+        }
152
+        else {
153
+            this.baseClass = "icon-recEnable";
154
+            this.recordingOnKey = "recording.on";
155
+            this.recordingOffKey = "recording.off";
156
+            this.recordingPendingKey = "recording.pending";
157
+            this.failedToStartKey = "recording.failedToStart";
158
+        }
159
+
160
+        selector.addClass(this.baseClass);
161
+
162
+        var self = this;
163
+        selector.click(function () {
164
+            console.log("BUTTON CLICKED", self.currentState);
165
+            switch (self.currentState) {
166
+                case "on": {
167
+                    _showStopRecordingPrompt(recordingType).then(() =>
168
+                        self.eventEmitter.emit(UIEvents.RECORDING_TOGGLED));
169
+                }
170
+                    break;
171
+                case "available":
172
+                case "off": {
173
+                    if (recordingType === 'jibri')
174
+                        _requestLiveStreamId().then((streamId) => {
175
+                            self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
176
+                                {streamId: streamId});
177
+                        });
178
+                    else {
179
+                        if (self.predefinedToken) {
180
+                            self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
181
+                                {token: self.predefinedToken});
182
+                            return;
183
+                        }
184
+
185
+                        _requestRecordingToken().then((token) => {
186
+                            self.eventEmitter.emit( UIEvents.RECORDING_TOGGLED,
187
+                                {token: token});
188
+                        });
189
+                    }
190
+                }
191
+                    break;
192
+                default: {
193
+                    APP.UI.messageHandler.openMessageDialog(
194
+                        "dialog.liveStreaming",
195
+                        "liveStreaming.unavailable"
196
+                    );
197
+                }
198
+            }
199
+        });
200
+    },
201
+
202
+    // Shows or hides the 'recording' button.
203
+    showRecordingButton (show) {
204
+        if (_isRecordingButtonEnabled() && show) {
205
+            $('#toolbar_button_record').css({display: "inline-block"});
206
+        } else {
207
+            $('#toolbar_button_record').css({display: "none"});
208
+        }
209
+    },
210
+
211
+    updateRecordingState(recordingState) {
212
+        // If there's no state change, we ignore the update.
213
+        if (this.currentState === recordingState)
214
+            return;
215
+
216
+        this.setRecordingButtonState(recordingState);
217
+    },
218
+
219
+    // Sets the state of the recording button
220
+    setRecordingButtonState (recordingState) {
221
+        let buttonSelector = $('#toolbar_button_record');
222
+        let labelSelector = $('#recordingLabel');
223
+
224
+        // TODO: handle recording state=available
225
+        if (recordingState === 'on') {
226
+
227
+            buttonSelector.removeClass(this.baseClass);
228
+            buttonSelector.addClass(this.baseClass + " active");
229
+
230
+            labelSelector.attr("data-i18n", this.recordingOnKey);
231
+            moveToCorner(labelSelector, true, 3000);
232
+            labelSelector
233
+                .text(APP.translation.translateString(this.recordingOnKey));
234
+        } else if (recordingState === 'off'
235
+                    || recordingState === 'unavailable') {
236
+
237
+            // We don't want to do any changes if this is
238
+            // an availability change.
239
+            if (this.currentState === "available"
240
+                || this.currentState === "unavailable")
241
+                return;
242
+
243
+            buttonSelector.removeClass(this.baseClass + " active");
244
+            buttonSelector.addClass(this.baseClass);
245
+
246
+            moveToCorner(labelSelector, false);
247
+            let messageKey;
248
+            if (this.currentState === "pending")
249
+                messageKey = this.failedToStartKey;
250
+            else
251
+                messageKey = this.recordingOffKey;
252
+
253
+            labelSelector.attr("data-i18n", messageKey);
254
+            labelSelector.text(APP.translation.translateString(messageKey));
255
+
256
+            setTimeout(function(){
257
+                $('#recordingLabel').css({display: "none"});
258
+            }, 5000);
259
+        }
260
+        else if (recordingState === 'pending') {
261
+
262
+            buttonSelector.removeClass(this.baseClass + " active");
263
+            buttonSelector.addClass(this.baseClass);
264
+
265
+            moveToCorner(labelSelector, false);
266
+            labelSelector
267
+                .attr("data-i18n", this.recordingPendingKey);
268
+            labelSelector
269
+                .text(APP.translation.translateString(
270
+                    this.recordingPendingKey));
271
+        }
272
+
273
+        this.currentState = recordingState;
274
+
275
+        if (!labelSelector.is(":visible"))
276
+            labelSelector.css({display: "inline-block"});
277
+    },
278
+    // checks whether recording is enabled and whether we have params
279
+    // to start automatically recording
280
+    checkAutoRecord () {
281
+        if (_isRecordingButtonEnabled && config.autoRecord) {
282
+            this.predefinedToken = UIUtil.escapeHtml(config.autoRecordToken);
283
+            this.eventEmitter.emit(UIEvents.RECORDING_TOGGLED,
284
+                                    this.predefinedToken);
285
+        }
286
+    }
287
+};
288
+
289
+export default Recording;

+ 4
- 73
modules/UI/toolbars/Toolbar.js Ver arquivo

@@ -6,7 +6,6 @@ import AnalyticsAdapter from '../../statistics/AnalyticsAdapter';
6 6
 import UIEvents from '../../../service/UI/UIEvents';
7 7
 
8 8
 let roomUrl = null;
9
-let recordingToaster = null;
10 9
 let emitter = null;
11 10
 
12 11
 
@@ -43,51 +42,6 @@ function openLinkDialog () {
43 42
     );
44 43
 }
45 44
 
46
-// Sets the state of the recording button
47
-function setRecordingButtonState (recordingState) {
48
-    let selector = $('#toolbar_button_record');
49
-
50
-    if (recordingState === 'on') {
51
-        selector.removeClass("icon-recEnable");
52
-        selector.addClass("icon-recEnable active");
53
-
54
-        $("#largeVideo").toggleClass("videoMessageFilter", true);
55
-        let recordOnKey = "recording.on";
56
-        $('#videoConnectionMessage').attr("data-i18n", recordOnKey);
57
-        $('#videoConnectionMessage').text(APP.translation.translateString(recordOnKey));
58
-
59
-        setTimeout(function(){
60
-            $("#largeVideo").toggleClass("videoMessageFilter", false);
61
-            $('#videoConnectionMessage').css({display: "none"});
62
-        }, 1500);
63
-
64
-        recordingToaster = messageHandler.notify(
65
-            null, "recording.toaster", null,
66
-            null, null,
67
-            {timeOut: 0, closeButton: null, tapToDismiss: false}
68
-        );
69
-    } else if (recordingState === 'off') {
70
-        selector.removeClass("icon-recEnable active");
71
-        selector.addClass("icon-recEnable");
72
-
73
-        $("#largeVideo").toggleClass("videoMessageFilter", false);
74
-        $('#videoConnectionMessage').css({display: "none"});
75
-
76
-        if (recordingToaster) {
77
-            messageHandler.remove(recordingToaster);
78
-        }
79
-    } else if (recordingState === 'pending') {
80
-        selector.removeClass("icon-recEnable active");
81
-        selector.addClass("icon-recEnable");
82
-
83
-        $("#largeVideo").toggleClass("videoMessageFilter", true);
84
-        let recordPendingKey = "recording.pending";
85
-        $('#videoConnectionMessage').attr("data-i18n", recordPendingKey);
86
-        $('#videoConnectionMessage').text(APP.translation.translateString(recordPendingKey));
87
-        $('#videoConnectionMessage').css({display: "block"});
88
-    }
89
-}
90
-
91 45
 const buttonHandlers = {
92 46
     "toolbar_button_mute": function () {
93 47
         if (APP.conference.audioMuted) {
@@ -107,10 +61,6 @@ const buttonHandlers = {
107 61
             emitter.emit(UIEvents.VIDEO_MUTED, true);
108 62
         }
109 63
     },
110
-    "toolbar_button_record": function () {
111
-        AnalyticsAdapter.sendEvent('toolbar.recording.toggled');
112
-        emitter.emit(UIEvents.RECORDING_TOGGLE);
113
-    },
114 64
     "toolbar_button_security": function () {
115 65
         emitter.emit(UIEvents.ROOM_LOCK_CLICKED);
116 66
     },
@@ -250,7 +200,8 @@ const Toolbar = {
250 200
      */
251 201
     unlockLockButton () {
252 202
         if ($("#toolbar_button_security").hasClass("icon-security-locked"))
253
-            UIUtil.buttonClick("#toolbar_button_security", "icon-security icon-security-locked");
203
+            UIUtil.buttonClick("#toolbar_button_security",
204
+                                "icon-security icon-security-locked");
254 205
     },
255 206
 
256 207
     /**
@@ -258,7 +209,8 @@ const Toolbar = {
258 209
      */
259 210
     lockLockButton () {
260 211
         if ($("#toolbar_button_security").hasClass("icon-security"))
261
-            UIUtil.buttonClick("#toolbar_button_security", "icon-security icon-security-locked");
212
+            UIUtil.buttonClick("#toolbar_button_security",
213
+                                "icon-security icon-security-locked");
262 214
     },
263 215
 
264 216
     /**
@@ -279,15 +231,6 @@ const Toolbar = {
279 231
         }
280 232
     },
281 233
 
282
-    // Shows or hides the 'recording' button.
283
-    showRecordingButton (show) {
284
-        if (UIUtil.isButtonEnabled('recording') && show) {
285
-            $('#toolbar_button_record').css({display: "inline-block"});
286
-        } else {
287
-            $('#toolbar_button_record').css({display: "none"});
288
-        }
289
-    },
290
-
291 234
     // Shows or hides the 'shared video' button.
292 235
     showSharedVideoButton () {
293 236
         if (UIUtil.isButtonEnabled('sharedvideo')
@@ -298,14 +241,6 @@ const Toolbar = {
298 241
         }
299 242
     },
300 243
 
301
-    // checks whether recording is enabled and whether we have params
302
-    // to start automatically recording
303
-    checkAutoRecord () {
304
-        if (UIUtil.isButtonEnabled('recording') && config.autoRecord) {
305
-            emitter.emit(UIEvents.RECORDING_TOGGLE, UIUtil.escapeHtml(config.autoRecordToken));
306
-        }
307
-    },
308
-
309 244
     // checks whether desktop sharing is enabled and whether
310 245
     // we have params to start automatically sharing
311 246
     checkAutoEnableDesktopSharing () {
@@ -383,10 +318,6 @@ const Toolbar = {
383 318
         }
384 319
     },
385 320
 
386
-    updateRecordingState (state) {
387
-        setRecordingButtonState(state);
388
-    },
389
-
390 321
     /**
391 322
      * Marks video icon as muted or not.
392 323
      * @param {boolean} muted if icon should look like muted or not

+ 1
- 5
modules/UI/util/UIUtil.js Ver arquivo

@@ -123,11 +123,7 @@
123 123
     },
124 124
 
125 125
     isButtonEnabled: function (name) {
126
-        var isEnabled = interfaceConfig.TOOLBAR_BUTTONS.indexOf(name) !== -1;
127
-        if (name === 'recording') {
128
-            return isEnabled && config.enableRecording;
129
-        }
130
-        return isEnabled;
126
+        return interfaceConfig.TOOLBAR_BUTTONS.indexOf(name) !== -1;
131 127
     },
132 128
 
133 129
     hideDisabledButtons: function (mappings) {

+ 1
- 1
service/UI/UIEvents.js Ver arquivo

@@ -62,7 +62,7 @@ export default {
62 62
     CONTACT_CLICKED: "UI.contact_clicked",
63 63
     HANGUP: "UI.hangup",
64 64
     LOGOUT: "UI.logout",
65
-    RECORDING_TOGGLE: "UI.recording_toggle",
65
+    RECORDING_TOGGLED: "UI.recording_toggled",
66 66
     SIP_DIAL: "UI.sip_dial",
67 67
     SUBJECT_CHANGED: "UI.subject_changed",
68 68
     VIDEO_DEVICE_CHANGED: "UI.video_device_changed",

Carregando…
Cancelar
Salvar