|
@@ -199,21 +199,21 @@ var VideoLayout = {
|
199
|
199
|
/**
|
200
|
200
|
* Checks if removed video is currently displayed and tries to display
|
201
|
201
|
* another one instead.
|
|
202
|
+ * Uses focusedID if any or dominantSpeakerID if any,
|
|
203
|
+ * otherwise elects new video, in this order.
|
202
|
204
|
*/
|
203
|
|
- updateRemovedVideo (id) {
|
|
205
|
+ updateAfterThumbRemoved (id) {
|
204
|
206
|
if (!this.isCurrentlyOnLarge(id)) {
|
205
|
207
|
return;
|
206
|
208
|
}
|
207
|
209
|
|
208
|
210
|
let newId;
|
209
|
211
|
|
210
|
|
- // We'll show user's avatar if he is the dominant speaker or if
|
211
|
|
- // his video thumbnail is pinned
|
212
|
|
- if (remoteVideos[id] && (id === pinnedId
|
213
|
|
- || id === currentDominantSpeaker)) {
|
214
|
|
- newId = id;
|
215
|
|
- } else {
|
216
|
|
- // Otherwise select last visible video
|
|
212
|
+ if (pinnedId)
|
|
213
|
+ newId = pinnedId;
|
|
214
|
+ else if (currentDominantSpeaker)
|
|
215
|
+ newId = currentDominantSpeaker;
|
|
216
|
+ else // Otherwise select last visible video
|
217
|
217
|
newId = this.electLastVisibleVideo();
|
218
|
218
|
}
|
219
|
219
|
|
|
@@ -304,8 +304,7 @@ var VideoLayout = {
|
304
|
304
|
*/
|
305
|
305
|
handleVideoThumbClicked (id) {
|
306
|
306
|
if(pinnedId) {
|
307
|
|
- var oldSmallVideo
|
308
|
|
- = VideoLayout.getSmallVideo(pinnedId);
|
|
307
|
+ var oldSmallVideo = VideoLayout.getSmallVideo(pinnedId);
|
309
|
308
|
if (oldSmallVideo && !interfaceConfig.filmStripOnly)
|
310
|
309
|
oldSmallVideo.focus(false);
|
311
|
310
|
}
|