easyproctor-hml 0.0.31 → 0.0.32
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 +8 -6
- package/index.js +8 -6
- package/package.json +1 -1
- package/unpkg/easyproctor.min.js +20 -20
package/esm/index.js
CHANGED
|
@@ -28740,6 +28740,7 @@ var DeviceChecker = class {
|
|
|
28740
28740
|
// src/errors/errors.ts
|
|
28741
28741
|
var NOT_SHARED_FIRST_SCREEN = "not_shared_first_screen";
|
|
28742
28742
|
var MULTIPLE_MONITORS_DETECTED = "multiple_monitors_detected";
|
|
28743
|
+
var PROCTORING_ALREADY_STARTED = "proctoring_already_started";
|
|
28743
28744
|
var PROCTORING_NOT_STARTED = "proctoring_not_started";
|
|
28744
28745
|
|
|
28745
28746
|
// src/extension/extension.ts
|
|
@@ -29562,8 +29563,6 @@ var Proctoring = class {
|
|
|
29562
29563
|
}
|
|
29563
29564
|
async start(options = getDefaultProctoringOptions, _videoOptions = {}) {
|
|
29564
29565
|
try {
|
|
29565
|
-
if (this.state != "Starting" /* Starting */)
|
|
29566
|
-
throw PROCTORING_NOT_STARTED;
|
|
29567
29566
|
this.extension = new Extension();
|
|
29568
29567
|
this.extension.addEventListener();
|
|
29569
29568
|
const baseURL = this.backend.selectBaseUrl(this.context.type);
|
|
@@ -29572,11 +29571,11 @@ var Proctoring = class {
|
|
|
29572
29571
|
this.sessionOptions = { ...getDefaultProctoringOptions, ...options };
|
|
29573
29572
|
this.videoOptions = validatePartialVideoOptions(_videoOptions);
|
|
29574
29573
|
await this.initConfig();
|
|
29575
|
-
trackers.registerError("this.proctoringId", "verifyMultipleMonitors");
|
|
29576
|
-
trackers.registerError("this.proctoringId", this.state);
|
|
29577
29574
|
await this.verifyMultipleMonitors(this.sessionOptions);
|
|
29575
|
+
if (this.state != "Stop" /* Stop */) {
|
|
29576
|
+
throw PROCTORING_ALREADY_STARTED;
|
|
29577
|
+
}
|
|
29578
29578
|
this.state = "Starting" /* Starting */;
|
|
29579
|
-
trackers.registerError("this.proctoringId", "passou");
|
|
29580
29579
|
if (await this.repository.hasSessions()) {
|
|
29581
29580
|
await this.repository.clear();
|
|
29582
29581
|
}
|
|
@@ -29684,7 +29683,7 @@ Upload Services: ${uploaderServices}`, this.serviceType);
|
|
|
29684
29683
|
const hasMultipleMonitors = await checkIfhasMultipleMonitors();
|
|
29685
29684
|
if (hasMultipleMonitors) {
|
|
29686
29685
|
trackers.registerError(this.proctoringId, "Multiplas telas detectadas!");
|
|
29687
|
-
throw MULTIPLE_MONITORS_DETECTED
|
|
29686
|
+
throw MULTIPLE_MONITORS_DETECTED;
|
|
29688
29687
|
}
|
|
29689
29688
|
}
|
|
29690
29689
|
}
|
|
@@ -29776,6 +29775,9 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
29776
29775
|
}
|
|
29777
29776
|
|
|
29778
29777
|
// src/index.ts
|
|
29778
|
+
var ebmlScript = document.createElement("script");
|
|
29779
|
+
ebmlScript.setAttribute("src", "https://www.webrtc-experiment.com/EBML.js");
|
|
29780
|
+
document.head.appendChild(ebmlScript);
|
|
29779
29781
|
if (typeof window !== "undefined") {
|
|
29780
29782
|
window.useProctoring = useProctoring;
|
|
29781
29783
|
}
|
package/index.js
CHANGED
|
@@ -40274,6 +40274,7 @@ var DeviceChecker = class {
|
|
|
40274
40274
|
// src/errors/errors.ts
|
|
40275
40275
|
var NOT_SHARED_FIRST_SCREEN = "not_shared_first_screen";
|
|
40276
40276
|
var MULTIPLE_MONITORS_DETECTED = "multiple_monitors_detected";
|
|
40277
|
+
var PROCTORING_ALREADY_STARTED = "proctoring_already_started";
|
|
40277
40278
|
var PROCTORING_NOT_STARTED = "proctoring_not_started";
|
|
40278
40279
|
|
|
40279
40280
|
// src/extension/extension.ts
|
|
@@ -41096,8 +41097,6 @@ var Proctoring = class {
|
|
|
41096
41097
|
}
|
|
41097
41098
|
async start(options = getDefaultProctoringOptions, _videoOptions = {}) {
|
|
41098
41099
|
try {
|
|
41099
|
-
if (this.state != "Starting" /* Starting */)
|
|
41100
|
-
throw PROCTORING_NOT_STARTED;
|
|
41101
41100
|
this.extension = new Extension();
|
|
41102
41101
|
this.extension.addEventListener();
|
|
41103
41102
|
const baseURL = this.backend.selectBaseUrl(this.context.type);
|
|
@@ -41106,11 +41105,11 @@ var Proctoring = class {
|
|
|
41106
41105
|
this.sessionOptions = { ...getDefaultProctoringOptions, ...options };
|
|
41107
41106
|
this.videoOptions = validatePartialVideoOptions(_videoOptions);
|
|
41108
41107
|
await this.initConfig();
|
|
41109
|
-
trackers.registerError("this.proctoringId", "verifyMultipleMonitors");
|
|
41110
|
-
trackers.registerError("this.proctoringId", this.state);
|
|
41111
41108
|
await this.verifyMultipleMonitors(this.sessionOptions);
|
|
41109
|
+
if (this.state != "Stop" /* Stop */) {
|
|
41110
|
+
throw PROCTORING_ALREADY_STARTED;
|
|
41111
|
+
}
|
|
41112
41112
|
this.state = "Starting" /* Starting */;
|
|
41113
|
-
trackers.registerError("this.proctoringId", "passou");
|
|
41114
41113
|
if (await this.repository.hasSessions()) {
|
|
41115
41114
|
await this.repository.clear();
|
|
41116
41115
|
}
|
|
@@ -41218,7 +41217,7 @@ Upload Services: ${uploaderServices}`, this.serviceType);
|
|
|
41218
41217
|
const hasMultipleMonitors = await checkIfhasMultipleMonitors();
|
|
41219
41218
|
if (hasMultipleMonitors) {
|
|
41220
41219
|
trackers.registerError(this.proctoringId, "Multiplas telas detectadas!");
|
|
41221
|
-
throw MULTIPLE_MONITORS_DETECTED
|
|
41220
|
+
throw MULTIPLE_MONITORS_DETECTED;
|
|
41222
41221
|
}
|
|
41223
41222
|
}
|
|
41224
41223
|
}
|
|
@@ -41310,6 +41309,9 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
41310
41309
|
}
|
|
41311
41310
|
|
|
41312
41311
|
// src/index.ts
|
|
41312
|
+
var ebmlScript = document.createElement("script");
|
|
41313
|
+
ebmlScript.setAttribute("src", "https://www.webrtc-experiment.com/EBML.js");
|
|
41314
|
+
document.head.appendChild(ebmlScript);
|
|
41313
41315
|
if (typeof window !== "undefined") {
|
|
41314
41316
|
window.useProctoring = useProctoring;
|
|
41315
41317
|
}
|