From 59ec0c3f331f9d31b65ef1578590b10022e7c8c8 Mon Sep 17 00:00:00 2001 From: hristoterezov <hristo@jitsi.org> Date: Wed, 28 Dec 2016 10:36:08 -0600 Subject: [PATCH] fix(screensharing) --- windows/jitsi-meet/render.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/windows/jitsi-meet/render.js b/windows/jitsi-meet/render.js index 786414e..a983d86 100644 --- a/windows/jitsi-meet/render.js +++ b/windows/jitsi-meet/render.js @@ -59,8 +59,7 @@ const dialogFactory = new DialogFactory(); /** * Boolean variable that indicates whether the onloaded function was already * called. - * NOTE: Used to not call the onload method more than once during reloads of - * the iframe or location changes. + * NOTE: Used to not initialize more thean once some objects. */ let loaded = false; @@ -71,11 +70,11 @@ let loaded = false; * Initializes remote control. */ function onload() { + loaded = true; + setupScreenSharingForWindow(iframe.contentWindow); if(loaded) { return; } - loaded = true; - setupScreenSharingForWindow(iframe.contentWindow); channel = postis({ window: iframe.contentWindow, windowForEventListening: window -- GitLab