Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes broken last-N

paweldomas2f03a0a7fe9d
diff --git a/modules/UI/videolayout/LocalVideo.js b/modules/UI/videolayout/LocalVideo.js
index d15fc13845..4fd1304207 100644
--- a/modules/UI/videolayout/LocalVideo.js
+++ b/modules/UI/videolayout/LocalVideo.js
@@ -166,7 +166,7 @@ LocalVideo.prototype.changeVideo = function (stream, isMuted) {
event.stopPropagation();
}
self.VideoLayout.handleVideoThumbClicked(
- false,
+ true,
APP.xmpp.myResource());
}
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js
index 36f6a940cf..d6c2a237b4 100644
--- a/modules/UI/videolayout/VideoLayout.js
+++ b/modules/UI/videolayout/VideoLayout.js
@@ -681,13 +681,19 @@ var VideoLayout = (function (my) {
lastNEndpoints.indexOf(resourceJid) < 0 &&
localLastNSet.indexOf(resourceJid) < 0) {
console.log("Remove from last N", resourceJid);
- remoteVideos[resourceJid].showPeerContainer('hide');
+ if (remoteVideos[resourceJid])
+ remoteVideos[resourceJid].showPeerContainer('hide');
+ else if (APP.xmpp.myResource() !== resourceJid)
+ console.error("No remote video for: " + resourceJid);
isReceived = false;
} else if (resourceJid &&
$('#participant_' + resourceJid).is(':visible') &&
lastNEndpoints.indexOf(resourceJid) < 0 &&
localLastNSet.indexOf(resourceJid) >= 0) {
- remoteVideos[resourceJid].showPeerContainer('avatar');
+ if (remoteVideos[resourceJid])
+ remoteVideos[resourceJid].showPeerContainer('avatar');
+ else if (APP.xmpp.myResource() !== resourceJid)
+ console.error("No remote video for: " + resourceJid);
isReceived = false;
}