SEBWIN-449: Continuing work on remote proctoring.

This commit is contained in:
Damian Büchel 2021-03-04 16:05:22 +01:00
parent bcb3dd602a
commit 9f9f7c847d
4 changed files with 127 additions and 0 deletions

View file

@ -30,6 +30,11 @@ namespace SafeExamBrowser.Proctoring
window = uiFactory.CreateProctoringWindow(control);
window.Show();
// TODO
//var content = load Zoom page, replace //INDEX_JS//;
//control.NavigateToString(content);
}
public void Terminate()

View file

@ -94,6 +94,13 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Zoom\index.html" />
<Content Include="Zoom\index.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Jitsi\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.705.50\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.705.50\build\Microsoft.Web.WebView2.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View file

@ -0,0 +1,20 @@
<html>
<head>
<meta charset="utf-8" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.8.1/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="https://source.zoom.us/1.8.1/css/react-select.css" />
</head>
<body>
<script src="https://source.zoom.us/1.8.1/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/1.8.1/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/1.8.1/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/1.8.1/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/1.8.1/lib/vendor/jquery.min.js"></script>
<script src="https://source.zoom.us/1.8.1/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-1.8.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9/crypto-js.min.js"></script>
<script type="text/javascript">
//INDEX_JS//
</script>
</body>
</html>

View file

@ -0,0 +1,95 @@
const API_KEY = "wX6KmZetQgeYqJix3W7Vtw";
const API_SECRET = "IEgu4vcOgTz1yYeNypBHDTMzMshDbpbpoaGj";
console.log("Checking system requirements...");
console.log(JSON.stringify(ZoomMtg.checkSystemRequirements()));
console.log("Initializing Zoom...");
ZoomMtg.setZoomJSLib('https://source.zoom.us/1.8.1/lib', '/av');
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();
const config = {
meetingNumber: 4290573697,
leaveUrl: 'https://google.ch',
userName: 'Firstname Lastname',
userEmail: 'firstname.lastname@yoursite.com',
/* passWord: 'password', // if required */
role: 0 // 1 for host; 0 for attendee
};
const signature = ZoomMtg.generateSignature({
meetingNumber: config.meetingNumber,
apiKey: API_KEY,
apiSecret: API_SECRET,
role: config.role,
error: function (res) {
console.error("FAILED TO GENERATE SIGNATURE: " + res)
},
success: function (res) {
console.log("Successfully generated signature.");
console.log(res.result);
},
});
console.log("Initializing meeting...");
// See documentation: https://zoom.github.io/sample-app-web/ZoomMtg.html#init
ZoomMtg.init({
debug: true, //optional
leaveUrl: config.leaveUrl, //required
// webEndpoint: 'PSO web domain', // PSO option
showMeetingHeader: true, //option
disableInvite: false, //optional
disableCallOut: false, //optional
disableRecord: false, //optional
disableJoinAudio: false, //optional
audioPanelAlwaysOpen: true, //optional
showPureSharingContent: false, //optional
isSupportAV: true, //optional,
isSupportChat: false, //optional,
isSupportQA: true, //optional,
isSupportCC: true, //optional,
screenShare: true, //optional,
rwcBackup: '', //optional,
videoDrag: true, //optional,
sharingMode: 'both', //optional,
videoHeader: true, //optional,
isLockBottom: true, // optional,
isSupportNonverbal: true, // optional,
isShowJoiningErrorDialog: true, // optional,
inviteUrlFormat: '', // optional
loginWindow: { // optional,
width: 400,
height: 380
},
// meetingInfo: [ // optional
// 'topic',
// 'host',
// 'mn',
// 'pwd',
// 'telPwd',
// 'invite',
// 'participant',
// 'dc'
// ],
disableVoIP: false, // optional
disableReport: false, // optional
error: function(res) {
console.warn("INIT ERROR")
console.log(res)
},
success: function() {
ZoomMtg.join({
signature: signature,
apiKey: API_KEY,
meetingNumber: config.meetingNumber,
userName: config.userName,
/* passWord: meetConfig.passWord, */
error(res) {
console.warn("JOIN ERROR")
console.log(res)
}
})
}
})