Browse Source

Coding style

master
Lyubo Marinov 8 years ago
parent
commit
f54e87d975
1 changed files with 17 additions and 16 deletions
  1. 17
    16
      modules/UI/videolayout/VideoContainer.js

+ 17
- 16
modules/UI/videolayout/VideoContainer.js View File

1
 /* global $, interfaceConfig */
1
 /* global $, interfaceConfig */
2
-/* jshint -W101 */
3
 
2
 
4
 import Filmstrip from './Filmstrip';
3
 import Filmstrip from './Filmstrip';
5
 import LargeContainer from './LargeContainer';
4
 import LargeContainer from './LargeContainer';
6
-import UIEvents from "../../../service/UI/UIEvents";
7
-import UIUtil from "../util/UIUtil";
5
+import UIEvents from '../../../service/UI/UIEvents';
6
+import UIUtil from '../util/UIUtil';
8
 
7
 
9
 // FIXME should be 'video'
8
 // FIXME should be 'video'
10
-export const VIDEO_CONTAINER_TYPE = "camera";
9
+export const VIDEO_CONTAINER_TYPE = 'camera';
11
 
10
 
12
 const FADE_DURATION_MS = 300;
11
 const FADE_DURATION_MS = 300;
13
 
12
 
208
          */
207
          */
209
         this.$wrapperParent = this.$wrapper.parent();
208
         this.$wrapperParent = this.$wrapper.parent();
210
 
209
 
211
-        this.avatarHeight = $("#dominantSpeakerAvatar").height();
210
+        this.avatarHeight = $('#dominantSpeakerAvatar').height();
212
 
211
 
213
         var onPlayingCallback = function (event) {
212
         var onPlayingCallback = function (event) {
214
             if (typeof resizeContainer === 'function') {
213
             if (typeof resizeContainer === 'function') {
252
      * <tt>false</tt> otherwise.
251
      * <tt>false</tt> otherwise.
253
      */
252
      */
254
     enableLocalConnectionProblemFilter (enable) {
253
     enableLocalConnectionProblemFilter (enable) {
255
-        this.$video.toggleClass("videoProblemFilter", enable);
256
-        this.$videoBackground.toggleClass("videoProblemFilter", enable);
254
+        this.$video.toggleClass('videoProblemFilter', enable);
255
+        this.$videoBackground.toggleClass('videoProblemFilter', enable);
257
     }
256
     }
258
 
257
 
259
     /**
258
     /**
343
      */
342
      */
344
     _positionParticipantStatus($element) {
343
     _positionParticipantStatus($element) {
345
         if (this.avatarDisplayed) {
344
         if (this.avatarDisplayed) {
346
-            let $avatarImage = $("#dominantSpeakerAvatar");
345
+            let $avatarImage = $('#dominantSpeakerAvatar');
347
             $element.css(
346
             $element.css(
348
                 'top',
347
                 'top',
349
                 $avatarImage.offset().top + $avatarImage.height() + 10);
348
                 $avatarImage.offset().top + $avatarImage.height() + 10);
368
 
367
 
369
         if ((containerWidth > width) || (containerHeight > height)) {
368
         if ((containerWidth > width) || (containerHeight > height)) {
370
             this._showVideoBackground();
369
             this._showVideoBackground();
371
-            const css = containerWidth > width
372
-                ? {width: '100%', height: 'auto'} : {width: 'auto', height: '100%'};
370
+            const css
371
+                = containerWidth > width
372
+                    ? { width: '100%', height: 'auto' }
373
+                    : { width: 'auto', height: '100%' };
373
             this.$videoBackground.css(css);
374
             this.$videoBackground.css(css);
374
         }
375
         }
375
 
376
 
503
         // find a workaround for the video flickering.
504
         // find a workaround for the video flickering.
504
         this.setLargeVideoBackground(show);
505
         this.setLargeVideoBackground(show);
505
 
506
 
506
-        this.$avatar.css("visibility", show ? "visible" : "hidden");
507
+        this.$avatar.css('visibility', show ? 'visible' : 'hidden');
507
         this.avatarDisplayed = show;
508
         this.avatarDisplayed = show;
508
 
509
 
509
         this.emitter.emit(UIEvents.LARGE_VIDEO_AVATAR_VISIBLE, show);
510
         this.emitter.emit(UIEvents.LARGE_VIDEO_AVATAR_VISIBLE, show);
517
      * the indication.
518
      * the indication.
518
      */
519
      */
519
     showRemoteConnectionProblemIndicator (show) {
520
     showRemoteConnectionProblemIndicator (show) {
520
-        this.$video.toggleClass("remoteVideoProblemFilter", show);
521
-        this.$videoBackground.toggleClass("remoteVideoProblemFilter", show);
521
+        this.$video.toggleClass('remoteVideoProblemFilter', show);
522
+        this.$videoBackground.toggleClass('remoteVideoProblemFilter', show);
522
 
523
 
523
-        this.$avatar.toggleClass("remoteVideoProblemFilter", show);
524
+        this.$avatar.toggleClass('remoteVideoProblemFilter', show);
524
     }
525
     }
525
 
526
 
526
     // We are doing fadeOut/fadeIn animations on parent div which wraps
527
     // We are doing fadeOut/fadeIn animations on parent div which wraps
582
      * @returns {void}
583
      * @returns {void}
583
      */
584
      */
584
     setLargeVideoBackground (isAvatar) {
585
     setLargeVideoBackground (isAvatar) {
585
-        $("#largeVideoContainer").css("background",
586
+        $('#largeVideoContainer').css('background',
586
             (this.videoType === VIDEO_CONTAINER_TYPE && !isAvatar)
587
             (this.videoType === VIDEO_CONTAINER_TYPE && !isAvatar)
587
-                ? "#000" : interfaceConfig.DEFAULT_BACKGROUND);
588
+                ? '#000' : interfaceConfig.DEFAULT_BACKGROUND);
588
     }
589
     }
589
 
590
 
590
     /**
591
     /**

Loading…
Cancel
Save