diff --git a/bigbluebutton-html5/imports/ui/components/cursor/service.js b/bigbluebutton-html5/imports/ui/components/cursor/service.js index f0df850a843a4c7c663fc100a190ee409e5902e9..3a2efb7992b926fd8933f76d802343bcce4a8bc1 100755 --- a/bigbluebutton-html5/imports/ui/components/cursor/service.js +++ b/bigbluebutton-html5/imports/ui/components/cursor/service.js @@ -49,9 +49,11 @@ export function initCursorStreamListener() { const startStreamHandlersPromise = new Promise((resolve) => { const checkStreamHandlersInterval = setInterval(() => { - const streamHandlersSize = JSON.parse(JSON.stringify((Meteor.StreamerCentral.instances[`cursor-${Auth.meetingID}`].handlers))); + const streamHandlersSize = Object.values(Meteor.StreamerCentral.instances[`cursor-${Auth.meetingID}`].handlers) + .filter(el => el != undefined) + .length; - if (!Object.keys(streamHandlersSize).length) { + if (!streamHandlersSize) { resolve(clearInterval(checkStreamHandlersInterval)); } }, 250); diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/service.js b/bigbluebutton-html5/imports/ui/components/whiteboard/service.js index 499ae05964fd6401f090dcf61401b6746a8c913e..f8712a3e36576d430bd50bb52fb8dc6b880848d9 100755 --- a/bigbluebutton-html5/imports/ui/components/whiteboard/service.js +++ b/bigbluebutton-html5/imports/ui/components/whiteboard/service.js @@ -108,9 +108,11 @@ export function initAnnotationsStreamListener() { const startStreamHandlersPromise = new Promise((resolve) => { const checkStreamHandlersInterval = setInterval(() => { - const streamHandlersSize = JSON.parse(JSON.stringify((Meteor.StreamerCentral.instances[`annotations-${Auth.meetingID}`].handlers))); + const streamHandlersSize = Object.values(Meteor.StreamerCentral.instances[`annotations-${Auth.meetingID}`].handlers) + .filter(el => el != undefined) + .length; - if (!Object.keys(streamHandlersSize).length) { + if (!streamHandlersSize) { resolve(clearInterval(checkStreamHandlersInterval)); } }, 250);