From e41c8eff14f72770b9973f7815be51c908b947f2 Mon Sep 17 00:00:00 2001 From: George Politis Date: Mon, 27 Oct 2014 12:09:24 +0100 Subject: [PATCH] Fixes issue with video pre-loading. --- videolayout.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/videolayout.js b/videolayout.js index 1d8f6a1a5..59dc36ebd 100644 --- a/videolayout.js +++ b/videolayout.js @@ -182,11 +182,6 @@ var VideoLayout = (function (my) { largeVideoState.preload = null; largeVideoState.preload_ssrc = 0; } else { - if (largeVideoState.preload - && largeVideoState.preload != null) { - $(largeVideoState.preload).remove(); - largeVideoState.preload_ssrc = 0; - } $('#largeVideo').attr('src', largeVideoState.newSrc); } @@ -1467,7 +1462,6 @@ var VideoLayout = (function (my) { } if (session && electedStream) { - console.info('Switching simulcast substream.'); console.info([esl, primarySSRC, msid, session, electedStream]); var msidParts = msid.split(' '); @@ -1563,6 +1557,13 @@ var VideoLayout = (function (my) { } else { + if (largeVideoState.preload + && largeVideoState.preload != null) { + $(largeVideoState.preload).remove(); + } + + largeVideoState.preload_ssrc = 0; + electedStreamUrl = webkitURL.createObjectURL(electedStream); }