Browse Source

use latest version of the config.channelLastN

master
isymchych 9 years ago
parent
commit
cd71b0a603
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      modules/UI/videolayout/VideoLayout.js

+ 7
- 7
modules/UI/videolayout/VideoLayout.js View File

20
 var localVideoThumbnail = null;
20
 var localVideoThumbnail = null;
21
 
21
 
22
 var currentDominantSpeaker = null;
22
 var currentDominantSpeaker = null;
23
-var lastNCount = config.channelLastN;
24
 var localLastNCount = config.channelLastN;
23
 var localLastNCount = config.channelLastN;
25
 var localLastNSet = [];
24
 var localLastNSet = [];
26
 var lastNEndpointsCache = [];
25
 var lastNEndpointsCache = [];
98
         localVideoThumbnail = new LocalVideo(VideoLayout, emitter);
97
         localVideoThumbnail = new LocalVideo(VideoLayout, emitter);
99
 
98
 
100
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
99
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
100
+        this.lastNCount = config.channelLastN;
101
     },
101
     },
102
 
102
 
103
     initLargeVideo (isSideBarVisible) {
103
     initLargeVideo (isSideBarVisible) {
116
     },
116
     },
117
 
117
 
118
     isInLastN (resource) {
118
     isInLastN (resource) {
119
-        return lastNCount < 0 || // lastN is disabled
119
+        return this.lastNCount < 0 || // lastN is disabled
120
              // lastNEndpoints cache not built yet
120
              // lastNEndpoints cache not built yet
121
-            (lastNCount > 0 && !lastNEndpointsCache.length) ||
121
+            (this.lastNCount > 0 && !lastNEndpointsCache.length) ||
122
             (lastNEndpointsCache &&
122
             (lastNEndpointsCache &&
123
                 lastNEndpointsCache.indexOf(resource) !== -1);
123
                 lastNEndpointsCache.indexOf(resource) !== -1);
124
     },
124
     },
578
      * endpoints
578
      * endpoints
579
      */
579
      */
580
     onLastNEndpointsChanged (lastNEndpoints, endpointsEnteringLastN) {
580
     onLastNEndpointsChanged (lastNEndpoints, endpointsEnteringLastN) {
581
-        if (lastNCount !== lastNEndpoints.length)
582
-            lastNCount = lastNEndpoints.length;
581
+        if (this.lastNCount !== lastNEndpoints.length)
582
+            this.lastNCount = lastNEndpoints.length;
583
 
583
 
584
         lastNEndpointsCache = lastNEndpoints;
584
         lastNEndpointsCache = lastNEndpoints;
585
 
585
 
594
         // enters E's local LastN ejecting C.
594
         // enters E's local LastN ejecting C.
595
 
595
 
596
         // Increase the local LastN set size, if necessary.
596
         // Increase the local LastN set size, if necessary.
597
-        if (lastNCount > localLastNCount) {
598
-            localLastNCount = lastNCount;
597
+        if (this.lastNCount > localLastNCount) {
598
+            localLastNCount = this.lastNCount;
599
         }
599
         }
600
 
600
 
601
         // Update the local LastN set preserving the order in which the
601
         // Update the local LastN set preserving the order in which the

Loading…
Cancel
Save