Merge branch 'promised_based_api_interation' of bitbucket.org:jamkazam/jam-cloud into promised_based_api_interation

This commit is contained in:
Nuwan 2022-07-30 08:28:34 +05:30
commit b32621fe42
2 changed files with 20 additions and 20 deletions

View File

@ -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);
})(window, jQuery);

View File

@ -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