SEBWIN-475: Added asynchronous logout command via JavaScript again.

This commit is contained in:
Damian Büchel 2021-07-08 14:18:15 +02:00
parent 0a2b1670d4
commit 316c384428

View file

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