_addon.Getting_GetRecordingPath is not a function

Description

when i call zoomsdk.GetSetting().GetRecordingSetting().Getting_GetRecordingPath(),get en error as below:

Uncaught Exception:
TypeError: _addon.Getting_GetRecordingPath is not a function
at Object.Getting_GetRecordingPath

Which version?
mac electron

Hi Sloppy.cao,

Thanks for using Zoom SDK. The Getting_GetRecordingPath is inside here: https://github.com/zoom/zoom-macsdk-electron/blob/master/lib/zoom_setting_recording.js#L35, and the error you are getting, if might be either your _addon is not successfully initialized, or your ZoomRecordingSetting instance is not been initialized successfully. You can refer to the following part: https://github.com/zoom/zoom-macsdk-electron/blob/d01da57f455f01f5256bace5a86a7a1451b99334/lib/zoom_setting.js#L77, as you can see, if the _addon part is null, then it will return null instead of the ZoomRecordingSetting instance, then calling the methods in this instance will bring you the error you are getting.

Hope this helps. Thanks!

hello, i try to console _addon at line77 and line35,found _addon is null,just:{},and i run the demo code follow as:https://github.com/zoom/zoom-macsdk-electron,and other zoom function is ok,for example,join meeting,login,auth sdk,anything wrong with the demo code?and i found the mac init sdk code as below:


//mac initoption
var ZOOMSDKMOD = require("./lib/zoom_sdk.js")
var initoptions={
    path:'',
    threadsafemode:0,
    ostype:ZOOMSDKMOD.ZOOM_TYPE_OS_TYPE.MAC_OS,
}
const zoomsdk = ZOOMSDKMOD.ZoomSDK.getInstance(initoptions)

the path is empty,is the right?

and i found zooksdk_bridge.js has only implement getAuthService, there is not an implement getSettingService

and i found there is no setting bridge.js at lib/mac folderimage

hi,
i fix it,i found no implement for getSettingService, and i write some code implement this function

first: create two bridge file ,recording_setting_bridge.js,setting_bridge.js into folder lib/mac

And file content as below:
setting_bridge.js

var ZOOMSDKMOD = require('../zoom_sdk.js')

var $ = require('../../node_modules/nodobjc');
var ZOOMSDK = require('./zoomsdk_bridge.js');
var RECORDINSETTINGBRIDGE= require("./recording_setting_bridge.js");

var zoomSettingService;
var ZoomSettingBJ = (function () {
    return{
        SetZoomSetting: function(zoomSetting){
            zoomSettingService = zoomSetting;
            if(!zoomSettingService){
                return;
            }
            RECORDINSETTINGBRIDGE.RecordingSettingBJ.SetRecordSetting(zoomSettingService("getRecordSetting"));
        }
  }
})();

module.exports = 
{
  ZoomSettingBJ: ZoomSettingBJ,
}

recording_setting_bridge.js content as below:


var ZOOMSDKMOD = require('../zoom_sdk.js')

var $ = require('../../node_modules/nodobjc');
var ZOOMSDK = require('./zoomsdk_bridge.js');

var recordSettingService;
var ReSettingBJ = (function () {
    return{
        SetRecordSetting: function(recordSetting){
            recordSettingService = recordSetting;
        },
        Setting_SetRecordingPath: function(szPath){
            if(!recordSettingService){
                ZOOMSDKMOD.ZoomSDKError.SDKERR_UNINITIALIZE;
            }
            var szPathstring = $.NSString('stringWithUTF8String',szPath);
            var result = recordSettingService('setRecordingPath', szPathstring);
            return result;
        },
        Getting_GetRecordingPath: function(){
            if(!recordSettingService){
                return "";
            }
            var szPath = recordSettingService('getRecordingPath');
            console.log("szPath:"+szPath);
            return String(szPath);
        },
  }
})();

module.exports = 
{
  RecordingSettingBJ: ReSettingBJ,
}

Second ,change some code:

change lib/zoom_setting.js GetRecordingSetting function add one line code:
clientOpts.ostype = _osType

change lib/zoom_setting_recording.js init function add code as below:

 var _osType = clientOpts.ostype;
  // Private methods and variables
 var _addon = clientOpts.addon || null
 var ZOOMSDKMOD_4AUTH = require('./zoom_sdk.js')
 if (ZOOMSDKMOD_4AUTH.ZOOM_TYPE_OS_TYPE.MAC_OS == _osType)
 {
        var SETTINGBRIDGE = require('./mac/recording_setting_bridge.js');
        _addon = SETTINGBRIDGE.RecordingSettingBJ;
 }

change lib/mac/zooksdk_bridge.js add code as below to function InitComponent:

var ZOOMSETTINGBRIDGE = require('./setting_bridge.js')
var settingService = zoomSDK('getSettingService');
if(settingService){
      ZOOMSETTINGBRIDGE.ZoomSettingBJ.SetZoomSetting(settingService);
}

then i can call the function in my project code as below:
zoomsdk.GetSetting().GetRecordingSetting().Getting_GetRecordingPath();

Hi,

Thank you very much for your reply and the details. Glad to hear that you problem has been resolved.

Thanks!