From 2004b6ef1837565d75ad588d39975754a1810195 Mon Sep 17 00:00:00 2001 From: George Politis Date: Fri, 21 Nov 2014 11:29:37 +0100 Subject: [PATCH] Fixes an issue where the pinned video src was getting set when it shouldn't. --- videolayout.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/videolayout.js b/videolayout.js index 759ed586d5..345b996034 100644 --- a/videolayout.js +++ b/videolayout.js @@ -1609,7 +1609,12 @@ var VideoLayout = (function (my) { // and VideoLayout.getLargeVideoResource methods. var updateLargeVideo = (ssrc2jid[videoSrcToSsrc[selRemoteVideo.attr('src')]] == ssrc2jid[videoSrcToSsrc[largeVideoState.newSrc]]); - var updateFocusedVideoSrc = (selRemoteVideo.attr('src') == focusedVideoSrc); + + // We should only update the focused video src if it's not a + // falsy value. + var updateFocusedVideoSrc + = focusedVideoSrc && focusedVideoSrc !== '' + && (selRemoteVideo.attr('src') == focusedVideoSrc); var electedStreamUrl; if (largeVideoState.preload_ssrc == primarySSRC)