From fd2eab589c997ce72aa2ce92177f0bc7be444dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Wed, 19 May 2021 01:35:01 +0200 Subject: [PATCH] SEBWIN-490: Ensured users can't hangup call, automatically unmuting microphone and camera if users attempt to mute them, fixed window visibility on end of broadcast from SEB server, made initial proctoring view size bigger and fixed icon when proctoring is active. --- SafeExamBrowser.Proctoring/JitsiMeet/index.html | 13 ++++++++++++- SafeExamBrowser.Proctoring/ProctoringController.cs | 6 ++++++ .../Images/ProctoringNotification_Active.xaml | 5 +---- .../Images/ProctoringNotification_Inactive.xaml | 2 +- .../Windows/ProctoringWindow.xaml | 2 +- .../Images/ProctoringNotification_Active.xaml | 9 +++++++++ .../Images/ProctoringNotification_Inactive.xaml | 9 +++++++++ .../SafeExamBrowser.UserInterface.Mobile.csproj | 8 ++++++++ .../Windows/ProctoringWindow.xaml | 2 +- 9 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Active.xaml create mode 100644 SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Inactive.xaml diff --git a/SafeExamBrowser.Proctoring/JitsiMeet/index.html b/SafeExamBrowser.Proctoring/JitsiMeet/index.html index 94cef1e8..c2d9faa5 100644 --- a/SafeExamBrowser.Proctoring/JitsiMeet/index.html +++ b/SafeExamBrowser.Proctoring/JitsiMeet/index.html @@ -17,7 +17,7 @@ SHOW_JITSI_WATERMARK: false, TOOLBAR_BUTTONS: [ 'microphone', 'camera', '%%_ALLOW_CLOSED_CAPTIONS_%%', /*'desktop',*/ 'embedmeeting', 'fullscreen', - 'fodeviceselection', 'hangup', 'profile', '%%_ALLOW_CHAT_%%', '%%_ALLOW_RECORDING_%%', + 'fodeviceselection', /*'hangup',*/ 'profile', '%%_ALLOW_CHAT_%%', '%%_ALLOW_RECORDING_%%', 'livestreaming', 'etherpad', /*'sharedvideo',*/ 'settings', '%%_ALLOW_RAISE_HAND_%%', 'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts', '%%_ALLOW_TILE_VIEW_%%', 'select-background', 'download', 'help', /*'mute-everyone',*/ 'mute-video-everyone', 'security' @@ -34,6 +34,17 @@ }; var api = new JitsiMeetExternalAPI("%%_DOMAIN_%%", options); + api.addListener('audioMuteStatusChanged', args => { + if (args.muted) { + api.executeCommand('toggleAudio'); + } + }); + api.addListener('videoMuteStatusChanged', args => { + if (args.muted) { + api.executeCommand('toggleVideo'); + } + }); + api.executeCommand("subject", "%%_SUBJECT_%%"); diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs index 63ddf825..2f9038a6 100644 --- a/SafeExamBrowser.Proctoring/ProctoringController.cs +++ b/SafeExamBrowser.Proctoring/ProctoringController.cs @@ -39,6 +39,7 @@ namespace SafeExamBrowser.Proctoring private ProctoringControl control; private ProctoringSettings settings; private IProctoringWindow window; + private WindowVisibility windowVisibility; public IconResource IconResource { get; set; } public string Tooltip { get; set; } @@ -81,6 +82,7 @@ namespace SafeExamBrowser.Proctoring var start = false; this.settings = settings; + this.windowVisibility = settings.WindowVisibility; server.ProctoringConfigurationReceived += Server_ProctoringConfigurationReceived; server.ProctoringInstructionReceived += Server_ProctoringInstructionReceived; @@ -134,6 +136,10 @@ namespace SafeExamBrowser.Proctoring { settings.WindowVisibility = WindowVisibility.AllowToHide; } + else + { + settings.WindowVisibility = windowVisibility; + } StopProctoring(); StartProctoring(); diff --git a/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Active.xaml b/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Active.xaml index e53ef338..19cf1d38 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Active.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Active.xaml @@ -3,10 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - - - - + diff --git a/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Inactive.xaml b/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Inactive.xaml index f01d3c34..b5bb5988 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Inactive.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Images/ProctoringNotification_Inactive.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + diff --git a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml index 6433deaa..69ccc6e4 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml +++ b/SafeExamBrowser.UserInterface.Desktop/Windows/ProctoringWindow.xaml @@ -4,5 +4,5 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Desktop.Windows" - mc:Ignorable="d" Height="250" Width="350" MinHeight="250" MinWidth="250" Topmost="True" WindowStyle="ToolWindow"> + mc:Ignorable="d" Height="350" Width="450" MinHeight="250" MinWidth="250" Topmost="True" WindowStyle="ToolWindow"> diff --git a/SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Active.xaml b/SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Active.xaml new file mode 100644 index 00000000..19cf1d38 --- /dev/null +++ b/SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Active.xaml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Inactive.xaml b/SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Inactive.xaml new file mode 100644 index 00000000..b5bb5988 --- /dev/null +++ b/SafeExamBrowser.UserInterface.Mobile/Images/ProctoringNotification_Inactive.xaml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj b/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj index bc75f551..0bef8b77 100644 --- a/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj +++ b/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj @@ -239,6 +239,14 @@ + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml b/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml index e37acd0c..b3bae33d 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ProctoringWindow.xaml @@ -4,5 +4,5 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SafeExamBrowser.UserInterface.Mobile.Windows" - mc:Ignorable="d" Height="250" Width="350" MinHeight="250" MinWidth="250" Topmost="True" WindowStyle="ToolWindow"> + mc:Ignorable="d" Height="350" Width="450" MinHeight="250" MinWidth="250" Topmost="True" WindowStyle="ToolWindow">