diff --git a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs index cf4a2f38..a55f36d6 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs @@ -92,12 +92,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping case Keys.Proctoring.Zoom.AllowRaiseHand: MapZoomAllowRaiseHands(settings, value); break; - case Keys.Proctoring.Zoom.ApiKey: - MapZoomApiKey(settings, value); - break; - case Keys.Proctoring.Zoom.ApiSecret: - MapZoomApiSecret(settings, value); - break; case Keys.Proctoring.Zoom.AudioMuted: MapZoomAudioMuted(settings, value); break; @@ -353,22 +347,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping } } - private void MapZoomApiKey(AppSettings settings, object value) - { - if (value is string key) - { - settings.Proctoring.Zoom.ApiKey = key; - } - } - - private void MapZoomApiSecret(AppSettings settings, object value) - { - if (value is string secret) - { - settings.Proctoring.Zoom.ApiSecret = secret; - } - } - private void MapZoomAudioMuted(AppSettings settings, object value) { if (value is bool muted) diff --git a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs index e14897dc..a6cd5795 100644 --- a/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs +++ b/SafeExamBrowser.Configuration/ConfigurationData/Keys.cs @@ -258,8 +258,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData internal const string AllowChat = "zoomFeatureFlagChat"; internal const string AllowClosedCaptions = "zoomFeatureFlagCloseCaptions"; internal const string AllowRaiseHand = "zoomFeatureFlagRaiseHand"; - internal const string ApiKey = "zoomApiKey"; - internal const string ApiSecret = "zoomApiSecret"; internal const string AudioMuted = "zoomAudioMuted"; internal const string Enabled = "zoomEnable"; internal const string MeetingNumber = "zoomRoom"; diff --git a/SafeExamBrowser.Proctoring/ProctoringControl.cs b/SafeExamBrowser.Proctoring/ProctoringControl.cs index 2d04669c..568cd95f 100644 --- a/SafeExamBrowser.Proctoring/ProctoringControl.cs +++ b/SafeExamBrowser.Proctoring/ProctoringControl.cs @@ -96,10 +96,9 @@ namespace SafeExamBrowser.Proctoring } else if (settings.Zoom.Enabled) { - credentials.Add(new JProperty("apiKey", settings.Zoom.ApiKey)); - credentials.Add(new JProperty("apiSecret", settings.Zoom.ApiSecret)); credentials.Add(new JProperty("meetingNumber", settings.Zoom.MeetingNumber)); credentials.Add(new JProperty("password", settings.Zoom.Password)); + credentials.Add(new JProperty("sdkKey", settings.Zoom.SdkKey)); credentials.Add(new JProperty("signature", settings.Zoom.Signature)); credentials.Add(new JProperty("userName", settings.Zoom.UserName)); } diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs index e6313ead..7c1e936b 100644 --- a/SafeExamBrowser.Proctoring/ProctoringController.cs +++ b/SafeExamBrowser.Proctoring/ProctoringController.cs @@ -103,8 +103,7 @@ namespace SafeExamBrowser.Proctoring } else if (settings.Zoom.Enabled) { - start = !string.IsNullOrWhiteSpace(settings.Zoom.ApiKey); - start &= !string.IsNullOrWhiteSpace(settings.Zoom.ApiSecret) || !string.IsNullOrWhiteSpace(settings.Zoom.Signature); + start = !string.IsNullOrWhiteSpace(settings.Zoom.SdkKey) && !string.IsNullOrWhiteSpace(settings.Zoom.Signature); start &= !string.IsNullOrWhiteSpace(settings.Zoom.MeetingNumber); start &= !string.IsNullOrWhiteSpace(settings.Zoom.UserName); } @@ -168,9 +167,9 @@ namespace SafeExamBrowser.Proctoring settings.JitsiMeet.ServerUrl = args.JitsiMeetServerUrl; settings.JitsiMeet.Token = args.JitsiMeetToken; - settings.Zoom.ApiKey = args.ZoomApiKey; settings.Zoom.MeetingNumber = args.ZoomMeetingNumber; settings.Zoom.Password = args.ZoomPassword; + settings.Zoom.SdkKey = args.ZoomSdkKey; settings.Zoom.Signature = args.ZoomSignature; settings.Zoom.Subject = args.ZoomSubject; settings.Zoom.UserName = args.ZoomUserName; @@ -272,8 +271,8 @@ namespace SafeExamBrowser.Proctoring Thread.Sleep(2000); window.Close(); - control = default(ProctoringControl); - window = default(IProctoringWindow); + control = default; + window = default; fileSystem.Delete(filePath); logger.Info("Stopped proctoring."); diff --git a/SafeExamBrowser.Proctoring/Zoom/index.html b/SafeExamBrowser.Proctoring/Zoom/index.html index 515aef40..85f7169d 100644 --- a/SafeExamBrowser.Proctoring/Zoom/index.html +++ b/SafeExamBrowser.Proctoring/Zoom/index.html @@ -1,167 +1,148 @@ -
- - - - - - - - - - - - - + + + + + + - + window.addEventListener('unload', () => ZoomMtg.leaveMeeting({})); + window.chrome.webview.addEventListener('message', webMessageReceived); + window.chrome.webview.postMessage('credentials'); + +