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.

This commit is contained in:
damencho 2015-11-16 13:33:29 -06:00
parent 74c420a609
commit f9d1fd13df
1 changed files with 10 additions and 0 deletions

View File

@ -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 &&