easyproctor 0.0.34 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/index.js +21 -7
- package/index.js +21 -7
- package/package.json +1 -1
- package/unpkg/easyproctor.min.js +13 -13
package/esm/index.js
CHANGED
|
@@ -73,7 +73,7 @@ async function startScreenCapture(buffer, options) {
|
|
|
73
73
|
const isFirefox = navigator.userAgent.indexOf("Firefox") > -1;
|
|
74
74
|
if (isFirefox) {
|
|
75
75
|
const hasMultipleMonitors = !tracks.find((el) => el.label == "Primary Monitor");
|
|
76
|
-
if (hasMultipleMonitors) {
|
|
76
|
+
if (hasMultipleMonitors && allowOnlyFirstMonitor) {
|
|
77
77
|
throw MULTIPLE_MONITORS_DETECTED;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -8262,7 +8262,6 @@ var Initialization = function() {
|
|
|
8262
8262
|
// src/plugins/insights.ts
|
|
8263
8263
|
var insights;
|
|
8264
8264
|
var init = (key) => {
|
|
8265
|
-
console.log("Inicializando insights com key: " + key);
|
|
8266
8265
|
insights = new Initialization({
|
|
8267
8266
|
config: {
|
|
8268
8267
|
instrumentationKey: key
|
|
@@ -8454,8 +8453,13 @@ function useProctoring(proctoringOptions, proctoringConfig) {
|
|
|
8454
8453
|
}
|
|
8455
8454
|
try {
|
|
8456
8455
|
const { cameraStream, _screenStream } = await _startCapture({ cameraId, microphoneId, allowOnlyFirstMonitor, captureScreen, proctoringType });
|
|
8457
|
-
|
|
8458
|
-
|
|
8456
|
+
const serverTime = await makeRequest({
|
|
8457
|
+
url: `/Proctoring/server-hour`,
|
|
8458
|
+
method: "GET",
|
|
8459
|
+
jwt: proctoringOptions.token
|
|
8460
|
+
});
|
|
8461
|
+
startDate = new Date(serverTime.toString());
|
|
8462
|
+
startTime = startDate.getTime();
|
|
8459
8463
|
const resp = await makeRequest({
|
|
8460
8464
|
url: `/proctoring/start/${proctoringOptions.examId}`,
|
|
8461
8465
|
method: "POST",
|
|
@@ -8514,9 +8518,14 @@ function useProctoring(proctoringOptions, proctoringConfig) {
|
|
|
8514
8518
|
throw PROCTORING_NOT_STARTED;
|
|
8515
8519
|
}
|
|
8516
8520
|
const { cameraStream, _screenStream } = await _startCapture({ cameraId, microphoneId, allowOnlyFirstMonitor, captureScreen, proctoringType });
|
|
8521
|
+
const serverTime = await makeRequest({
|
|
8522
|
+
url: `/Proctoring/server-hour`,
|
|
8523
|
+
method: "GET",
|
|
8524
|
+
jwt: proctoringOptions.token
|
|
8525
|
+
});
|
|
8517
8526
|
proctoringId = record.id;
|
|
8518
|
-
|
|
8519
|
-
|
|
8527
|
+
startDate = new Date(serverTime.toString());
|
|
8528
|
+
startTime = startDate.getTime();
|
|
8520
8529
|
return { cameraStream, _screenStream };
|
|
8521
8530
|
}
|
|
8522
8531
|
async function finish(options = {}) {
|
|
@@ -8556,7 +8565,12 @@ function useProctoring(proctoringOptions, proctoringConfig) {
|
|
|
8556
8565
|
if (record.sessions.length == 0) {
|
|
8557
8566
|
throw NO_VIDEOS_RECORDED;
|
|
8558
8567
|
}
|
|
8559
|
-
const
|
|
8568
|
+
const serverTime = await makeRequest({
|
|
8569
|
+
url: `/Proctoring/server-hour`,
|
|
8570
|
+
method: "GET",
|
|
8571
|
+
jwt: proctoringOptions.token
|
|
8572
|
+
});
|
|
8573
|
+
const time = new Date(serverTime.toString()).toISOString();
|
|
8560
8574
|
const allFiles = [];
|
|
8561
8575
|
record.sessions.forEach((session) => {
|
|
8562
8576
|
if (session.cameraFile)
|
package/index.js
CHANGED
|
@@ -8436,7 +8436,7 @@ async function startScreenCapture(buffer, options) {
|
|
|
8436
8436
|
const isFirefox = navigator.userAgent.indexOf("Firefox") > -1;
|
|
8437
8437
|
if (isFirefox) {
|
|
8438
8438
|
const hasMultipleMonitors = !tracks.find((el) => el.label == "Primary Monitor");
|
|
8439
|
-
if (hasMultipleMonitors) {
|
|
8439
|
+
if (hasMultipleMonitors && allowOnlyFirstMonitor) {
|
|
8440
8440
|
throw MULTIPLE_MONITORS_DETECTED;
|
|
8441
8441
|
}
|
|
8442
8442
|
}
|
|
@@ -8602,7 +8602,6 @@ async function clearBuffers(table) {
|
|
|
8602
8602
|
var import_applicationinsights_web = __toModule(require_applicationinsights_web());
|
|
8603
8603
|
var insights;
|
|
8604
8604
|
var init = (key) => {
|
|
8605
|
-
console.log("Inicializando insights com key: " + key);
|
|
8606
8605
|
insights = new import_applicationinsights_web.ApplicationInsights({
|
|
8607
8606
|
config: {
|
|
8608
8607
|
instrumentationKey: key
|
|
@@ -8794,8 +8793,13 @@ function useProctoring(proctoringOptions, proctoringConfig) {
|
|
|
8794
8793
|
}
|
|
8795
8794
|
try {
|
|
8796
8795
|
const { cameraStream, _screenStream } = await _startCapture({ cameraId, microphoneId, allowOnlyFirstMonitor, captureScreen, proctoringType });
|
|
8797
|
-
|
|
8798
|
-
|
|
8796
|
+
const serverTime = await makeRequest({
|
|
8797
|
+
url: `/Proctoring/server-hour`,
|
|
8798
|
+
method: "GET",
|
|
8799
|
+
jwt: proctoringOptions.token
|
|
8800
|
+
});
|
|
8801
|
+
startDate = new Date(serverTime.toString());
|
|
8802
|
+
startTime = startDate.getTime();
|
|
8799
8803
|
const resp = await makeRequest({
|
|
8800
8804
|
url: `/proctoring/start/${proctoringOptions.examId}`,
|
|
8801
8805
|
method: "POST",
|
|
@@ -8854,9 +8858,14 @@ function useProctoring(proctoringOptions, proctoringConfig) {
|
|
|
8854
8858
|
throw PROCTORING_NOT_STARTED;
|
|
8855
8859
|
}
|
|
8856
8860
|
const { cameraStream, _screenStream } = await _startCapture({ cameraId, microphoneId, allowOnlyFirstMonitor, captureScreen, proctoringType });
|
|
8861
|
+
const serverTime = await makeRequest({
|
|
8862
|
+
url: `/Proctoring/server-hour`,
|
|
8863
|
+
method: "GET",
|
|
8864
|
+
jwt: proctoringOptions.token
|
|
8865
|
+
});
|
|
8857
8866
|
proctoringId = record.id;
|
|
8858
|
-
|
|
8859
|
-
|
|
8867
|
+
startDate = new Date(serverTime.toString());
|
|
8868
|
+
startTime = startDate.getTime();
|
|
8860
8869
|
return { cameraStream, _screenStream };
|
|
8861
8870
|
}
|
|
8862
8871
|
async function finish(options = {}) {
|
|
@@ -8896,7 +8905,12 @@ function useProctoring(proctoringOptions, proctoringConfig) {
|
|
|
8896
8905
|
if (record.sessions.length == 0) {
|
|
8897
8906
|
throw NO_VIDEOS_RECORDED;
|
|
8898
8907
|
}
|
|
8899
|
-
const
|
|
8908
|
+
const serverTime = await makeRequest({
|
|
8909
|
+
url: `/Proctoring/server-hour`,
|
|
8910
|
+
method: "GET",
|
|
8911
|
+
jwt: proctoringOptions.token
|
|
8912
|
+
});
|
|
8913
|
+
const time = new Date(serverTime.toString()).toISOString();
|
|
8900
8914
|
const allFiles = [];
|
|
8901
8915
|
record.sessions.forEach((session) => {
|
|
8902
8916
|
if (session.cameraFile)
|