소스 검색

Merge pull request #1167 from jitsi/fix_anonymous_domain

Fix the UI when anonymous domain auth is in use
j8
yanas 8 년 전
부모
커밋
e56f1a9ded

+ 6
- 3
conference.js 파일 보기

@@ -294,9 +294,10 @@ function changeLocalDisplayName(nickname = '') {
294 294
 }
295 295
 
296 296
 class ConferenceConnector {
297
-    constructor(resolve, reject) {
297
+    constructor(resolve, reject, invite) {
298 298
         this._resolve = resolve;
299 299
         this._reject = reject;
300
+        this._invite = invite;
300 301
         this.reconnectTimeout = null;
301 302
         room.on(ConferenceEvents.CONFERENCE_JOINED,
302 303
             this._handleConferenceJoined.bind(this));
@@ -340,7 +341,8 @@ class ConferenceConnector {
340 341
             }, 5000);
341 342
 
342 343
             // notify user that auth is required
343
-            AuthHandler.requireAuth(room, this.invite.getRoomLocker().password);
344
+            AuthHandler.requireAuth(
345
+                room, this._invite.getRoomLocker().password);
344 346
             break;
345 347
 
346 348
         case ConferenceErrors.RESERVATION_ERROR:
@@ -521,7 +523,8 @@ export default {
521 523
                 // XXX The API will take care of disconnecting from the XMPP
522 524
                 // server (and, thus, leaving the room) on unload.
523 525
                 return new Promise((resolve, reject) => {
524
-                    (new ConferenceConnector(resolve, reject)).connect();
526
+                    (new ConferenceConnector(
527
+                        resolve, reject, this.invite)).connect();
525 528
                 });
526 529
         });
527 530
     },

+ 6
- 6
modules/UI/UI.js 파일 보기

@@ -443,10 +443,10 @@ UI.start = function () {
443 443
         // Display notice message at the top of the toolbar
444 444
         if (config.noticeMessage) {
445 445
             $('#noticeText').text(config.noticeMessage);
446
-            UIUtil.showElement('notice');
446
+            UIUtil.setVisible('notice', true);
447 447
         }
448 448
     } else {
449
-        UIUtil.hideElement('mainToolbarContainer');
449
+        UIUtil.setVisible('mainToolbarContainer', false);
450 450
         FilmStrip.setupFilmStripOnly();
451 451
         messageHandler.enableNotifications(false);
452 452
         JitsiPopover.enabled = false;
@@ -1105,13 +1105,13 @@ UI.updateAuthInfo = function (isAuthEnabled, login) {
1105 1105
     let showAuth = isAuthEnabled && UIUtil.isAuthenticationEnabled();
1106 1106
     let loggedIn = !!login;
1107 1107
 
1108
-    Toolbar.showAuthenticateButton(showAuth);
1108
+    Profile.showAuthenticationButtons(showAuth);
1109 1109
 
1110 1110
     if (showAuth) {
1111
-        Toolbar.setAuthenticatedIdentity(login);
1111
+        Profile.setAuthenticatedIdentity(login);
1112 1112
 
1113
-        Toolbar.showLoginButton(!loggedIn);
1114
-        Toolbar.showLogoutButton(loggedIn);
1113
+        Profile.showLoginButton(!loggedIn);
1114
+        Profile.showLogoutButton(loggedIn);
1115 1115
     }
1116 1116
 };
1117 1117
 

+ 3
- 10
modules/UI/recording/Recording.js 파일 보기

@@ -392,11 +392,7 @@ var Recording = {
392 392
         let shouldShow = show && _isRecordingButtonEnabled();
393 393
         let id = 'toolbar_button_record';
394 394
 
395
-        if (shouldShow) {
396
-            UIUtil.showElement(id);
397
-        } else {
398
-            UIUtil.hideElement(id);
399
-        }
395
+        UIUtil.setVisible(id, shouldShow);
400 396
     },
401 397
 
402 398
     /**
@@ -480,11 +476,8 @@ var Recording = {
480 476
 
481 477
         // Recording spinner
482 478
         let spinnerId = 'recordingSpinner';
483
-        if(recordingState === Status.RETRYING) {
484
-            UIUtil.showElement(spinnerId);
485
-        } else {
486
-            UIUtil.hideElement(spinnerId);
487
-        }
479
+        UIUtil.setVisible(
480
+            spinnerId, recordingState === Status.RETRYING);
488 481
     },
489 482
     // checks whether recording is enabled and whether we have params
490 483
     // to start automatically recording

+ 1
- 5
modules/UI/side_pannels/chat/Chat.js 파일 보기

@@ -306,18 +306,14 @@ var Chat = {
306 306
      * @param subject the subject
307 307
      */
308 308
     setSubject (subject) {
309
-        let toggleFunction;
310 309
         if (subject) {
311 310
             subject = subject.trim();
312 311
         }
313 312
 
314
-        toggleFunction = subject ? UIUtil.showElement : UIUtil.hideElement;
315
-        toggleFunction = toggleFunction.bind(UIUtil);
316
-
317 313
         let subjectId = 'subject';
318 314
         let html = linkify(UIUtil.escapeHtml(subject));
319 315
         $(`#${subjectId}`).html(html);
320
-        toggleFunction(subjectId);
316
+        UIUtil.setVisible(subjectId, subject && subject.length > 0);
321 317
     },
322 318
 
323 319
     /**

+ 74
- 5
modules/UI/side_pannels/profile/Profile.js 파일 보기

@@ -1,4 +1,4 @@
1
-/* global $ */
1
+/* global $, APP, JitsiMeetJS */
2 2
 import UIUtil from "../../util/UIUtil";
3 3
 import UIEvents from "../../../../service/UI/UIEvents";
4 4
 import Settings from '../../../settings/Settings';
@@ -18,15 +18,15 @@ const htmlStr = `
18 18
             <input id="setEmail" type="text" class="input-control" 
19 19
                 data-i18n="[placeholder]profile.setEmailInput">
20 20
         </div>
21
-        <div id="authenticationContainer" 
21
+        <div id="profile_auth_container" 
22 22
              class="sideToolbarBlock auth_container">
23 23
             <p data-i18n="toolbar.authenticate"></p>
24 24
             <ul>
25
-                <li id="toolbar_auth_identity"></li>
26
-                <li id="toolbar_button_login">
25
+                <li id="profile_auth_identity"></li>
26
+                <li id="profile_button_login">
27 27
                     <a class="authButton" data-i18n="toolbar.login"></a>
28 28
                 </li>
29
-                <li id="toolbar_button_logout">
29
+                <li id="profile_button_logout">
30 30
                     <a class="authButton" data-i18n="toolbar.logout"></a>
31 31
                 </li>
32 32
             </ul>
@@ -68,6 +68,34 @@ export default {
68 68
                     updateEmail();
69 69
                 }
70 70
             }).focusout(updateEmail);
71
+
72
+        // LOGIN
73
+        function loginClicked () {
74
+            JitsiMeetJS.analytics.sendEvent('authenticate.login.clicked');
75
+            emitter.emit(UIEvents.AUTH_CLICKED);
76
+        }
77
+
78
+        $('#profile_button_login').click(loginClicked);
79
+
80
+        // LOGOUT
81
+        function logoutClicked () {
82
+            let titleKey = "dialog.logoutTitle";
83
+            let msgKey = "dialog.logoutQuestion";
84
+            JitsiMeetJS.analytics.sendEvent('authenticate.logout.clicked');
85
+            // Ask for confirmation
86
+            APP.UI.messageHandler.openTwoButtonDialog({
87
+                titleKey: titleKey,
88
+                msgKey: msgKey,
89
+                leftButtonKey: "dialog.Yes",
90
+                submitFunction: function (evt, yes) {
91
+                    if (yes) {
92
+                        emitter.emit(UIEvents.LOGOUT);
93
+                    }
94
+                }
95
+            });
96
+        }
97
+
98
+        $('#profile_button_logout').click(logoutClicked);
71 99
     },
72 100
 
73 101
     /**
@@ -92,5 +120,46 @@ export default {
92 120
      */
93 121
     changeAvatar (avatarUrl) {
94 122
         $('#avatar').attr('src', avatarUrl);
123
+    },
124
+
125
+    /**
126
+     * Shows or hides authentication related buttons
127
+     * @param {boolean} show <tt>true</tt> to show or <tt>false</tt> to hide
128
+     */
129
+    showAuthenticationButtons (show) {
130
+        let id = 'profile_auth_container';
131
+        UIUtil.setVisible(id, show);
132
+    },
133
+
134
+    /**
135
+     * Shows/hides login button.
136
+     * @param {boolean} show <tt>true</tt> to show or <tt>false</tt> to hide
137
+     */
138
+    showLoginButton (show) {
139
+        let id = 'profile_button_login';
140
+
141
+        UIUtil.setVisible(id, show);
142
+    },
143
+
144
+    /**
145
+     * Shows/hides logout button.
146
+     * @param {boolean} show <tt>true</tt> to show or <tt>false</tt> to hide
147
+     */
148
+    showLogoutButton (show) {
149
+        let id = 'profile_button_logout';
150
+
151
+        UIUtil.setVisible(id, show);
152
+    },
153
+
154
+    /**
155
+     * Displays user's authenticated identity name (login).
156
+     * @param {string} authIdentity identity name to be displayed.
157
+     */
158
+    setAuthenticatedIdentity (authIdentity) {
159
+        let id = 'profile_auth_identity';
160
+
161
+        UIUtil.setVisible(id, !!authIdentity);
162
+
163
+        $(`#${id}`).text(authIdentity ? authIdentity : '');
95 164
     }
96 165
 };

+ 11
- 13
modules/UI/side_pannels/settings/SettingsMenu.js 파일 보기

@@ -166,7 +166,7 @@ export default {
166 166
             APP.translation.addLanguageChangedListener(
167 167
                 lng => selectInput[0].dataset.i18n = `languages:${lng}`);
168 168
 
169
-            UIUtil.showElement(wrapperId);
169
+            UIUtil.setVisible(wrapperId, true);
170 170
         }
171 171
         // DEVICES LIST
172 172
         if (UIUtil.isSettingEnabled('devices')) {
@@ -181,9 +181,9 @@ export default {
181 181
                 });
182 182
             // Only show the subtitle if this isn't the only setting section.
183 183
             if (interfaceConfig.SETTINGS_SECTIONS.length > 1)
184
-                UIUtil.showElement("deviceOptionsTitle");
184
+                UIUtil.setVisible("deviceOptionsTitle", true);
185 185
 
186
-            UIUtil.showElement(wrapperId);
186
+            UIUtil.setVisible(wrapperId, true);
187 187
         }
188 188
         // MODERATOR
189 189
         if (UIUtil.isSettingEnabled('moderator')) {
@@ -208,7 +208,7 @@ export default {
208 208
                 emitter.emit(UIEvents.FOLLOW_ME_ENABLED, isFollowMeEnabled);
209 209
             });
210 210
 
211
-            UIUtil.showElement(wrapperId);
211
+            UIUtil.setVisible(wrapperId, true);
212 212
         }
213 213
     },
214 214
 
@@ -245,15 +245,15 @@ export default {
245 245
             // Only show the subtitle if this isn't the only setting section.
246 246
             if (!$("#moderatorOptionsTitle").is(":visible")
247 247
                     && interfaceConfig.SETTINGS_SECTIONS.length > 1)
248
-                UIUtil.showElement("moderatorOptionsTitle");
248
+                UIUtil.setVisible("moderatorOptionsTitle", true);
249 249
 
250
-            UIUtil.showElement("startMutedOptions");
250
+            UIUtil.setVisible("startMutedOptions", true);
251 251
         } else {
252 252
             // Only show the subtitle if this isn't the only setting section.
253 253
             if ($("#moderatorOptionsTitle").is(":visible"))
254
-                UIUtil.hideElement("moderatorOptionsTitle");
254
+                UIUtil.setVisible("moderatorOptionsTitle", false);
255 255
 
256
-            UIUtil.hideElement("startMutedOptions");
256
+            UIUtil.setVisible("startMutedOptions", false);
257 257
         }
258 258
     },
259 259
 
@@ -268,11 +268,9 @@ export default {
268 268
      * @param {boolean} show {true} to show those options, {false} to hide them
269 269
      */
270 270
     showFollowMeOptions (show) {
271
-        if (show && UIUtil.isSettingEnabled('moderator')) {
272
-            UIUtil.showElement("followMeOptions");
273
-        } else {
274
-            UIUtil.hideElement("followMeOptions");
275
-        }
271
+        UIUtil.setVisible(
272
+            "followMeOptions",
273
+            show && UIUtil.isSettingEnabled('moderator'));
276 274
     },
277 275
 
278 276
     /**

+ 9
- 87
modules/UI/toolbars/Toolbar.js 파일 보기

@@ -97,26 +97,6 @@ const buttonHandlers = {
97 97
         JitsiMeetJS.analytics.sendEvent('toolbar.hangup');
98 98
         emitter.emit(UIEvents.HANGUP);
99 99
     },
100
-    "toolbar_button_login": function () {
101
-        JitsiMeetJS.analytics.sendEvent('toolbar.authenticate.login.clicked');
102
-        emitter.emit(UIEvents.AUTH_CLICKED);
103
-    },
104
-    "toolbar_button_logout": function () {
105
-        let titleKey = "dialog.logoutTitle";
106
-        let msgKey = "dialog.logoutQuestion";
107
-        JitsiMeetJS.analytics.sendEvent('toolbar.authenticate.logout.clicked');
108
-        // Ask for confirmation
109
-        APP.UI.messageHandler.openTwoButtonDialog({
110
-            titleKey,
111
-            msgKey,
112
-            leftButtonKey: "dialog.Yes",
113
-            submitFunction: function (evt, yes) {
114
-                if (yes) {
115
-                    emitter.emit(UIEvents.LOGOUT);
116
-                }
117
-            }
118
-        });
119
-    },
120 100
     "toolbar_button_raisehand": function () {
121 101
         JitsiMeetJS.analytics.sendEvent('toolbar.raiseHand.clicked');
122 102
         APP.conference.maybeToggleRaisedHand();
@@ -275,7 +255,9 @@ const defaultToolbarButtons = {
275 255
     'recording': {
276 256
         id: 'toolbar_button_record',
277 257
         tooltipKey: 'liveStreaming.buttonTooltip',
278
-        className: 'button'
258
+        className: 'button',
259
+        hidden: true // will be displayed once
260
+                     // the recording functionality is detected
279 261
     },
280 262
     'sharedvideo': {
281 263
         id: 'toolbar_button_sharedvideo',
@@ -290,7 +272,9 @@ const defaultToolbarButtons = {
290 272
     'sip': {
291 273
         id: 'toolbar_button_sip',
292 274
         tooltipKey: 'toolbar.sip',
293
-        className: 'button icon-telephone'
275
+        className: 'button icon-telephone',
276
+        hidden: true // will be displayed once
277
+                     // the SIP calls functionality is detected
294 278
     },
295 279
     'dialpad': {
296 280
         id: 'toolbar_button_dialpad',
@@ -397,18 +381,6 @@ Toolbar = {
397 381
     isEnabled() {
398 382
         return this.enabled;
399 383
     },
400
-    /**
401
-     * Shows or hides authentication button
402
-     * @param show <tt>true</tt> to show or <tt>false</tt> to hide
403
-     */
404
-    showAuthenticateButton (show) {
405
-        let id = 'authenticationContainer';
406
-        if (show) {
407
-            UIUtil.showElement(id);
408
-        } else {
409
-            UIUtil.hideElement(id);
410
-        }
411
-    },
412 384
 
413 385
     showEtherpadButton () {
414 386
         if (!$('#toolbar_button_etherpad').is(":visible")) {
@@ -425,10 +397,8 @@ Toolbar = {
425 397
         if (shouldShow) {
426 398
             let el = document.getElementById(id);
427 399
             UIUtil.setTooltip(el, 'toolbar.sharedvideo', 'right');
428
-            UIUtil.showElement(id);
429
-        } else {
430
-            UIUtil.hideElement(id);
431 400
         }
401
+        UIUtil.setVisible(id, shouldShow);
432 402
     },
433 403
 
434 404
     // checks whether desktop sharing is enabled and whether
@@ -446,63 +416,15 @@ Toolbar = {
446 416
             && UIUtil.isButtonEnabled('sip') && show;
447 417
         let id = 'toolbar_button_sip';
448 418
 
449
-        if (shouldShow) {
450
-            UIUtil.showElement(id);
451
-        } else {
452
-            UIUtil.hideElement(id);
453
-        }
419
+        UIUtil.setVisible(id, shouldShow);
454 420
     },
455 421
 
456 422
     // Shows or hides the dialpad button
457 423
     showDialPadButton (show) {
458 424
         let shouldShow = UIUtil.isButtonEnabled('dialpad') && show;
459 425
         let id = 'toolbar_button_dialpad';
460
-        if (shouldShow) {
461
-            UIUtil.showElement(id);
462
-        } else {
463
-            UIUtil.hideElement(id);
464
-        }
465
-    },
466 426
 
467
-    /**
468
-     * Displays user authenticated identity name(login).
469
-     * @param authIdentity identity name to be displayed.
470
-     */
471
-    setAuthenticatedIdentity (authIdentity) {
472
-        let id = 'toolbar_auth_identity';
473
-        if(authIdentity) {
474
-            UIUtil.showElement(id);
475
-            $(`#${id}`).text(authIdentity);
476
-        } else {
477
-            UIUtil.hideElement(id);
478
-            $(`#${id}`).text('');
479
-        }
480
-    },
481
-
482
-    /**
483
-     * Shows/hides login button.
484
-     * @param show <tt>true</tt> to show
485
-     */
486
-    showLoginButton (show) {
487
-        let id = 'toolbar_button_login';
488
-        if (show) {
489
-            UIUtil.showElement(id);
490
-        } else {
491
-            UIUtil.hideElement(id);
492
-        }
493
-    },
494
-
495
-    /**
496
-     * Shows/hides logout button.
497
-     * @param show <tt>true</tt> to show
498
-     */
499
-    showLogoutButton (show) {
500
-        let id = 'toolbar_button_logout';
501
-        if (show) {
502
-            UIUtil.showElement(id);
503
-        } else {
504
-            UIUtil.hideElement(id);
505
-        }
427
+        UIUtil.setVisible(id, shouldShow);
506 428
     },
507 429
 
508 430
     /**

+ 9
- 1
modules/UI/util/MessageHandler.js 파일 보기

@@ -290,7 +290,15 @@ var messageHandler = {
290 290
             buttons: buttons,
291 291
             defaultButton: 1,
292 292
             promptspeed: 0,
293
-            loaded: loadedFunction,
293
+            loaded: function() {
294
+                if (loadedFunction) {
295
+                    loadedFunction.apply(this, arguments);
296
+                }
297
+                // Hide the close button
298
+                if (persistent) {
299
+                    $(".jqiclose", this).hide();
300
+                }
301
+            },
294 302
             submit: dontShowAgainSubmitFunctionWrapper(
295 303
                 dontShowAgain, submitFunction),
296 304
             close: closeFunction,

+ 16
- 33
modules/UI/util/UIUtil.js 파일 보기

@@ -240,11 +240,13 @@ const IndicatorFontSizes = {
240 240
     },
241 241
 
242 242
     /**
243
-     * Shows the element given by id.
243
+     * Shows / hides the element given by id.
244 244
      *
245
-     * @param {String} the identifier of the element to show
245
+     * @param {string|HTMLElement} idOrElement the identifier or the element
246
+     *        to show/hide
247
+     * @param {boolean} show <tt>true</tt> to show or <tt>false</tt> to hide
246 248
      */
247
-    showElement(id) {
249
+    setVisible(id, visible) {
248 250
         let element;
249 251
         if (id instanceof HTMLElement) {
250 252
             element = id;
@@ -256,40 +258,20 @@ const IndicatorFontSizes = {
256 258
             return;
257 259
         }
258 260
 
259
-        if(element.classList.contains('hide')) {
261
+        if (!visible)
262
+            element.classList.add('hide');
263
+        else if (element.classList.contains('hide')) {
260 264
             element.classList.remove('hide');
261 265
         }
262 266
 
263 267
         let type = this._getElementDefaultDisplay(element.tagName);
264 268
         let className = SHOW_CLASSES[type];
265
-        element.classList.add(className);
266
-    },
267 269
 
268
-    /**
269
-     * Hides the element given by id.
270
-     *
271
-     * @param {String} the identifier of the element to hide
272
-     */
273
-    hideElement(id) {
274
-        let element;
275
-        if (id instanceof HTMLElement) {
276
-            element = id;
277
-        } else {
278
-            element = document.getElementById(id);
270
+        if (visible) {
271
+            element.classList.add(className);
279 272
         }
280
-
281
-        if (!element) {
282
-            return;
283
-        }
284
-
285
-        let type = this._getElementDefaultDisplay(element.tagName);
286
-        let className = SHOW_CLASSES[type];
287
-
288
-        if(element.classList.contains(className)) {
273
+        else if (element.classList.contains(className))
289 274
             element.classList.remove(className);
290
-        }
291
-
292
-        element.classList.add('hide');
293 275
     },
294 276
 
295 277
     /**
@@ -311,12 +293,13 @@ const IndicatorFontSizes = {
311 293
     /**
312 294
      * Shows / hides the element with the given jQuery selector.
313 295
      *
314
-     * @param {jQuery} selector the jQuery selector of the element to show/hide
296
+     * @param {jQuery} jquerySelector the jQuery selector of the element to
297
+     * show / shide
315 298
      * @param {boolean} isVisible
316 299
      */
317
-    setVisibility(selector, isVisible) {
318
-        if (selector && selector.length > 0) {
319
-            selector.css("visibility", isVisible ? "visible" : "hidden");
300
+    setVisibleBySelector(jquerySelector, isVisible) {
301
+        if (jquerySelector && jquerySelector.length > 0) {
302
+            jquerySelector.css("visibility", isVisible ? "visible" : "hidden");
320 303
         }
321 304
     },
322 305
 

+ 3
- 3
modules/UI/videolayout/LargeVideoManager.js 파일 보기

@@ -333,13 +333,13 @@ export default class LargeVideoManager {
333 333
         }
334 334
 
335 335
         let id = 'localConnectionMessage';
336
+
337
+        UIUtil.setVisible(id, show);
338
+
336 339
         if (show) {
337
-            UIUtil.showElement(id);
338 340
             // Avatar message conflicts with 'videoConnectionMessage',
339 341
             // so it must be hidden
340 342
             this.showRemoteConnectionMessage(false);
341
-        } else {
342
-            UIUtil.hideElement(id);
343 343
         }
344 344
     }
345 345
 

+ 16
- 30
modules/UI/videolayout/SmallVideo.js 파일 보기

@@ -215,13 +215,10 @@ SmallVideo.prototype.hideIndicator = function () {
215 215
  * @param {boolean} isMuted indicates if the muted element should be shown
216 216
  * or hidden
217 217
  */
218
-SmallVideo.prototype.showAudioIndicator = function(isMuted) {
218
+SmallVideo.prototype.showAudioIndicator = function (isMuted) {
219 219
     let mutedIndicator = this.getAudioMutedIndicator();
220
-    if (isMuted) {
221
-        UIUtil.showElement(mutedIndicator);
222
-    } else {
223
-        UIUtil.hideElement(mutedIndicator);
224
-    }
220
+
221
+    UIUtil.setVisible(mutedIndicator, isMuted);
225 222
 
226 223
     this.isAudioMuted = isMuted;
227 224
 };
@@ -270,11 +267,8 @@ SmallVideo.prototype.setVideoMutedView = function(isMuted) {
270 267
     this.updateView();
271 268
 
272 269
     let element = this.getVideoMutedIndicator();
273
-    if (isMuted) {
274
-        UIUtil.showElement(element);
275
-    } else {
276
-        UIUtil.hideElement(element);
277
-    }
270
+
271
+    UIUtil.setVisible(element, isMuted);
278 272
 };
279 273
 
280 274
 /**
@@ -511,24 +505,24 @@ SmallVideo.prototype.updateView = function () {
511 505
     // Determine whether video, avatar or blackness should be displayed
512 506
     let displayMode = this.selectDisplayMode();
513 507
     // Show/hide video.
514
-    UIUtil.setVisibility(   this.selectVideoElement(),
515
-                            (displayMode === DISPLAY_VIDEO
508
+    UIUtil.setVisibleBySelector(this.selectVideoElement(),
509
+                                (displayMode === DISPLAY_VIDEO
516 510
                                 || displayMode === DISPLAY_VIDEO_WITH_NAME));
517 511
     // Show/hide the avatar.
518
-    UIUtil.setVisibility(   this.$avatar(),
519
-                            (displayMode === DISPLAY_AVATAR
512
+    UIUtil.setVisibleBySelector(this.$avatar(),
513
+                                (displayMode === DISPLAY_AVATAR
520 514
                                 || displayMode === DISPLAY_AVATAR_WITH_NAME));
521 515
     // Show/hide the display name.
522
-    UIUtil.setVisibility(   this.$displayName(),
523
-                            !this.hideDisplayName
524
-                            && (displayMode === DISPLAY_BLACKNESS_WITH_NAME
516
+    UIUtil.setVisibleBySelector(this.$displayName(),
517
+                                !this.hideDisplayName
518
+                                && (displayMode === DISPLAY_BLACKNESS_WITH_NAME
525 519
                                 || displayMode === DISPLAY_VIDEO_WITH_NAME
526 520
                                 || displayMode === DISPLAY_AVATAR_WITH_NAME));
527 521
     // show hide overlay when there is a video or avatar under
528 522
     // the display name
529
-    UIUtil.setVisibility(   $('#' + this.videoSpanId
523
+    UIUtil.setVisibleBySelector($('#' + this.videoSpanId
530 524
                                 + ' .videocontainer__hoverOverlay'),
531
-                            (displayMode === DISPLAY_AVATAR_WITH_NAME
525
+                                (displayMode === DISPLAY_AVATAR_WITH_NAME
532 526
                                 || displayMode === DISPLAY_VIDEO_WITH_NAME));
533 527
 };
534 528
 
@@ -576,11 +570,7 @@ SmallVideo.prototype.showDominantSpeakerIndicator = function (show) {
576 570
         tooltip: 'speaker'
577 571
     });
578 572
 
579
-    if (show) {
580
-        UIUtil.showElement(indicatorSpan);
581
-    } else {
582
-        UIUtil.hideElement(indicatorSpan);
583
-    }
573
+    UIUtil.setVisible(indicatorSpan, show);
584 574
 };
585 575
 
586 576
 /**
@@ -604,11 +594,7 @@ SmallVideo.prototype.showRaisedHandIndicator = function (show) {
604 594
         tooltip: 'raisedHand'
605 595
     });
606 596
 
607
-    if (show) {
608
-        UIUtil.showElement(indicatorSpan);
609
-    } else {
610
-        UIUtil.hideElement(indicatorSpan);
611
-    }
597
+    UIUtil.setVisible(indicatorSpan, show);
612 598
 };
613 599
 
614 600
 /**

+ 1
- 5
modules/UI/videolayout/VideoLayout.js 파일 보기

@@ -1150,11 +1150,7 @@ var VideoLayout = {
1150 1150
     updateResolutionLabel(isResolutionHD) {
1151 1151
         let id = 'videoResolutionLabel';
1152 1152
 
1153
-        if (isResolutionHD) {
1154
-            UIUtil.showElement(id);
1155
-        } else {
1156
-            UIUtil.hideElement(id);
1157
-        }
1153
+        UIUtil.setVisible(id, isResolutionHD);
1158 1154
     },
1159 1155
 
1160 1156
     /**

Loading…
취소
저장