Fixes broken last-N

This commit is contained in:
paweldomas 2015-08-24 11:37:23 +02:00
parent 4c2f0d3600
commit 2f03a0a7fe
2 changed files with 9 additions and 3 deletions

View File

@ -166,7 +166,7 @@ LocalVideo.prototype.changeVideo = function (stream, isMuted) {
event.stopPropagation();
}
self.VideoLayout.handleVideoThumbClicked(
false,
true,
APP.xmpp.myResource());
}

View File

@ -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;
}