From 2adf33e689bd05054cc6c48acaf03f350b6f5c3f Mon Sep 17 00:00:00 2001 From: Murali Gowrisankaran Date: Thu, 28 Jul 2022 01:12:30 +0000 Subject: [PATCH] Removed/commented out video related frontend API calls --- web/app/assets/javascripts/JamServer.js | 4 +-- .../stores/VideoStore.js.coffee | 36 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/web/app/assets/javascripts/JamServer.js b/web/app/assets/javascripts/JamServer.js index ab0466419..0737db0c2 100644 --- a/web/app/assets/javascripts/JamServer.js +++ b/web/app/assets/javascripts/JamServer.js @@ -1059,7 +1059,7 @@ // } // } - connect(); + //connect(); async function connect(){ if (context.jamClient !== undefined && await context.jamClient.IsNativeClient()) { @@ -1111,4 +1111,4 @@ return this; } -})(window, jQuery); \ No newline at end of file +})(window, jQuery); diff --git a/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee b/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee index 076522782..3f6b7bdc4 100644 --- a/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee +++ b/web/app/assets/javascripts/react-components/stores/VideoStore.js.coffee @@ -131,7 +131,7 @@ BackendToFrontendFPS = { // keep state in sync this.state.videoEnabled = enable; - return this.onRefresh(); + //return this.onRefresh(); }` # onStartVideo: -> @@ -375,26 +375,26 @@ BackendToFrontendFPS = { # @configureWindow = window.open("/popups/configure-video", 'Configure Video', 'scrollbars=yes,toolbar=no,status=no,height=395,width=444') # ) - onCheckPromptConfigureVideo: `async function() { - // do not do any check if this is a client with no video enabled - if (await context.jamClient.FTUECurrentSelectedVideoDevice() == null) { return; } + #onCheckPromptConfigureVideo: `async function() { + #// do not do any check if this is a client with no video enabled + #if (await context.jamClient.FTUECurrentSelectedVideoDevice() == null) { return; } - if (this.state == null) { this.onRefresh(); } + #if (this.state == null) { this.onRefresh(); } - this.logger.debug("checkPromptConfigureVideo", this.state.currentDevice, this.state.deviceNames); + #this.logger.debug("checkPromptConfigureVideo", this.state.currentDevice, this.state.deviceNames); - // if no device configured and this is the native client and if you have at least 1 video - // currentDevice, from the backend, is '{'':''}' in the case of no device configured. But we also check for an empty object, or null object. - if (((this.state.currentDevice == null) || (Object.keys(this.state.currentDevice).length === 0) || ((Object.keys(this.state.currentDevice).length === 1) && (this.state.currentDevice[''] === ''))) && (typeof gon !== 'undefined' && gon !== null ? gon.isNativeClient : undefined) && (Object.keys(this.state.deviceNames).length > 0)) { - // and if they have not said stop bothering me about this - context.JK.ModUtils.shouldShow(NAMED_MESSAGES.CONFIGURE_VIDEO_NOSHOW).done(shouldShow => { - this.logger.debug("checking if user has 'should show' on video config: " + shouldShow); - if (shouldShow) { - return this.configureWindow = window.open("/popups/configure-video", 'Configure Video', 'scrollbars=yes,toolbar=no,status=no,height=395,width=444'); - } - }); - } - }` + #// if no device configured and this is the native client and if you have at least 1 video + #// currentDevice, from the backend, is '{'':''}' in the case of no device configured. But we also check for an empty object, or null object. + #if (((this.state.currentDevice == null) || (Object.keys(this.state.currentDevice).length === 0) || ((Object.keys(this.state.currentDevice).length === 1) && (this.state.currentDevice[''] === ''))) && (typeof gon !== 'undefined' && gon !== null ? gon.isNativeClient : undefined) && (Object.keys(this.state.deviceNames).length > 0)) { + # // and if they have not said stop bothering me about this + # context.JK.ModUtils.shouldShow(NAMED_MESSAGES.CONFIGURE_VIDEO_NOSHOW).done(shouldShow => { + # this.logger.debug("checking if user has 'should show' on video config: " + shouldShow); + # if (shouldShow) { + # return this.configureWindow = window.open("/popups/configure-video", 'Configure Video', 'scrollbars=yes,toolbar=no,status=no,height=395,width=444'); + # } + # }); + #} + #}` isVideoEnabled:() -> return @videoEnabled