Description
I have two setups for running the Zoom Client SDK. I’m trying to run the C# wrapper in a standalone console application, and C++ calls to the sdk_util class from an MVC project.
My console application:
Program.cs
static void Main(string[] args)
{
DebugLogService debugLogService = new DebugLogService();
ZoomService zoomService = new ZoomService(debugLogService);
zoomService.InitializationAsync("...", "...").Wait();
zoomService.JoinMeetingAsync("User", Convert.ToUInt64(123456789), "Pass").Wait();
Console.WriteLine("Press enter to leave meeting");
Console.ReadLine();
zoomService.LeaveMeeting();
}
ZoomService.cs
public async Task<bool> InitializationAsync(string appKey, string appSecret)
{
try
{
var sdkInitialized = SdkInitialize();
if (!sdkInitialized) return false;
Initialized = await SdkAuthenticationAsync(appKey, appSecret);
}
catch (Exception)
{
Initialized = false;
}
return Initialized;
}
private bool SdkInitialize()
{
InitParam param = new InitParam
{
web_domain = "https://zoom.us",
config_opts = { optionalFeatures = 1 << 5 }, // Using Zoom Customized UI
enable_log = true,
};
SDKError error = CZoomSDKeDotNetWrap.Instance.Initialize(param);
_logService.Log($"ZOOM InitSDK request result: {error}");
return error == SDKError.SDKERR_SUCCESS;
}
private async Task<bool> SdkAuthenticationAsync(string appKey, string appSecret)
{
RegisterAuthenticationCallbacks();
AuthParam authParam = new AuthParam
{
appKey = appKey,
appSecret = appSecret
};
SDKError error = CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(authParam);
_logService.Log($"ZOOM SDKAuth request result: {error}");
if (error == SDKError.SDKERR_SUCCESS)
{
_authTaskCompletion = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
await _authTaskCompletion.Task;
return true;
}
return false;
}
private void RegisterAuthenticationCallbacks()
{ CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().Add_CB_onAuthenticationReturn(OnAuthenticationReturn);
}
private void OnAuthenticationReturn(AuthResult result)
{
_logService.Log($"ZOOM OnAuthenticationReturn callback AuthResult: {result}");
_authTaskCompletion.SetResult(result == AuthResult.AUTHRET_SUCCESS);
}
Is there something else that I need to do to get this callback called? In hangs indefinitely.
Which Windows Client SDK version?
5.5.12509.0330
Assembly zoom_sdk_dotnet_wrap, Version=1.0.7575.37543