From f9d1fd13dfb57652a7307b14cd0998d2489032b4 Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 16 Nov 2015 13:33:29 -0600 Subject: [PATCH] Fixes an issue where lastN event, includes in the logic local resource and detects it as removed from lastN and schedules update of large video. If we receive this event for newly joined participant and we have pinned the local video, the event triggers update of large video which displays the wrong participant, not the pinned local video. --- modules/UI/videolayout/VideoLayout.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index 6513280b9..5c4449e3f 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -690,6 +690,16 @@ var VideoLayout = (function (my) { $('#remoteVideos>span').each(function( index, element ) { var resourceJid = VideoLayout.getPeerContainerResourceJid(element); + // We do not want to process any logic for our own(local) video + // because the local participant is never in the lastN set. + // The code of this function might detect that the local participant + // has been dropped out of the lastN set and will update the large + // video + // Detected from avatar tests, where lastN event override + // local video pinning + if(resourceJid == APP.xmpp.myResource()) + return; + var isReceived = true; if (resourceJid && lastNEndpoints.indexOf(resourceJid) < 0 &&