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