From 316c384428f672e2bc9e5c300f17d5ff98b530fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Thu, 8 Jul 2021 14:18:15 +0200 Subject: [PATCH] SEBWIN-475: Added asynchronous logout command via JavaScript again. --- SafeExamBrowser.Proctoring/ProctoringController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs index 86c98873..1842cf47 100644 --- a/SafeExamBrowser.Proctoring/ProctoringController.cs +++ b/SafeExamBrowser.Proctoring/ProctoringController.cs @@ -9,6 +9,7 @@ using System; using System.IO; using System.Reflection; +using System.Threading; using System.Windows; using Microsoft.Web.WebView2.Wpf; using SafeExamBrowser.Configuration.Contracts; @@ -214,6 +215,17 @@ namespace SafeExamBrowser.Proctoring { control.Dispatcher.Invoke(() => { + if (settings.JitsiMeet.Enabled) + { + control.ExecuteScriptAsync("api.executeCommand('hangup'); api.dispose();"); + } + else if (settings.Zoom.Enabled) + { + control.ExecuteScriptAsync("ZoomMtg.leaveMeeting({});"); + } + + Thread.Sleep(2000); + window.Close(); control = default(ProctoringControl); window = default(IProctoringWindow);