easyproctor 2.0.1 → 2.0.2
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/README.md +3 -0
- package/esm/index.js +17 -9
- package/index.js +17 -9
- package/package.json +1 -1
- package/proctoring/proctoring.d.ts +1 -0
- package/unpkg/easyproctor.min.js +12 -12
package/README.md
CHANGED
package/esm/index.js
CHANGED
|
@@ -8527,7 +8527,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
8527
8527
|
const microphones = document.querySelector("#micSelect");
|
|
8528
8528
|
cameras == null ? void 0 : cameras.addEventListener("change", async () => {
|
|
8529
8529
|
var _a2;
|
|
8530
|
-
await this.cameraRecorder.stopRecording();
|
|
8530
|
+
this.cameraRecorder.stopRecording && await this.cameraRecorder.stopRecording();
|
|
8531
8531
|
(_a2 = this.volumeMeter) == null ? void 0 : _a2.stop();
|
|
8532
8532
|
this.cameraRecorder = new CameraRecorder(
|
|
8533
8533
|
{
|
|
@@ -8548,7 +8548,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
8548
8548
|
});
|
|
8549
8549
|
microphones == null ? void 0 : microphones.addEventListener("change", async () => {
|
|
8550
8550
|
var _a2;
|
|
8551
|
-
await this.cameraRecorder.stopRecording();
|
|
8551
|
+
this.cameraRecorder.stopRecording && await this.cameraRecorder.stopRecording();
|
|
8552
8552
|
(_a2 = this.volumeMeter) == null ? void 0 : _a2.stop();
|
|
8553
8553
|
this.cameraRecorder = new CameraRecorder(
|
|
8554
8554
|
{
|
|
@@ -8602,7 +8602,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
8602
8602
|
this.faceDetection.stopDetection();
|
|
8603
8603
|
(_a2 = this.volumeMeter) == null ? void 0 : _a2.stop();
|
|
8604
8604
|
this.volumeMedia = Math.ceil(this.volumeSum / this.volumeCounter);
|
|
8605
|
-
await this.cameraRecorder.stopRecording();
|
|
8605
|
+
this.cameraRecorder.stopRecording && await this.cameraRecorder.stopRecording();
|
|
8606
8606
|
}
|
|
8607
8607
|
applyStyles(element, styles) {
|
|
8608
8608
|
for (const [property, value] of Object.entries(styles)) {
|
|
@@ -8928,7 +8928,7 @@ var AudioRecorder = class {
|
|
|
8928
8928
|
async resumeRecording() {
|
|
8929
8929
|
}
|
|
8930
8930
|
async stopRecording() {
|
|
8931
|
-
await this.recordingStop();
|
|
8931
|
+
this.recordingStop && await this.recordingStop();
|
|
8932
8932
|
}
|
|
8933
8933
|
async saveOnSession(session, start, end) {
|
|
8934
8934
|
session.addRecording({
|
|
@@ -11305,7 +11305,7 @@ var NoiseRecorder = class {
|
|
|
11305
11305
|
}
|
|
11306
11306
|
}
|
|
11307
11307
|
async stopSoundRecord() {
|
|
11308
|
-
await this.audioRecorder.stopRecording();
|
|
11308
|
+
this.audioRecorder.stopRecording && await this.audioRecorder.stopRecording();
|
|
11309
11309
|
this.recordingEndTime = Date.now() - this.examStartTime;
|
|
11310
11310
|
if (this.optionsProctoring.proctoringType !== "REALTIME")
|
|
11311
11311
|
return;
|
|
@@ -12104,19 +12104,29 @@ Error: ` + error
|
|
|
12104
12104
|
|
|
12105
12105
|
// src/proctoring/useProctoring.ts
|
|
12106
12106
|
function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
12107
|
+
if (!proctoringOptions.showConsole) {
|
|
12108
|
+
console.log = () => {
|
|
12109
|
+
};
|
|
12110
|
+
console.warn = () => {
|
|
12111
|
+
};
|
|
12112
|
+
console.error = () => {
|
|
12113
|
+
};
|
|
12114
|
+
}
|
|
12107
12115
|
const proctoring = new Proctoring({
|
|
12108
12116
|
type: enviromentConfig,
|
|
12109
12117
|
clientId: proctoringOptions.clientId,
|
|
12110
12118
|
examId: proctoringOptions.examId,
|
|
12111
12119
|
token: proctoringOptions.token,
|
|
12112
|
-
credentials: proctoringOptions.credentials
|
|
12120
|
+
credentials: proctoringOptions.credentials,
|
|
12121
|
+
showConsole: proctoringOptions.showConsole
|
|
12113
12122
|
});
|
|
12114
12123
|
const checker = new DeviceChecker({
|
|
12115
12124
|
type: enviromentConfig,
|
|
12116
12125
|
clientId: proctoringOptions.clientId,
|
|
12117
12126
|
examId: proctoringOptions.examId,
|
|
12118
12127
|
token: proctoringOptions.token,
|
|
12119
|
-
credentials: proctoringOptions.credentials
|
|
12128
|
+
credentials: proctoringOptions.credentials,
|
|
12129
|
+
showConsole: proctoringOptions.showConsole
|
|
12120
12130
|
});
|
|
12121
12131
|
const photo = new CapturePhoto();
|
|
12122
12132
|
const login = proctoring.login.bind(proctoring);
|
|
@@ -12151,8 +12161,6 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
12151
12161
|
}
|
|
12152
12162
|
|
|
12153
12163
|
// src/index.ts
|
|
12154
|
-
console.log = () => {
|
|
12155
|
-
};
|
|
12156
12164
|
if (typeof window !== "undefined") {
|
|
12157
12165
|
window.useProctoring = useProctoring;
|
|
12158
12166
|
}
|
package/index.js
CHANGED
|
@@ -20058,7 +20058,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
20058
20058
|
const microphones = document.querySelector("#micSelect");
|
|
20059
20059
|
cameras == null ? void 0 : cameras.addEventListener("change", async () => {
|
|
20060
20060
|
var _a2;
|
|
20061
|
-
await this.cameraRecorder.stopRecording();
|
|
20061
|
+
this.cameraRecorder.stopRecording && await this.cameraRecorder.stopRecording();
|
|
20062
20062
|
(_a2 = this.volumeMeter) == null ? void 0 : _a2.stop();
|
|
20063
20063
|
this.cameraRecorder = new CameraRecorder(
|
|
20064
20064
|
{
|
|
@@ -20079,7 +20079,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
20079
20079
|
});
|
|
20080
20080
|
microphones == null ? void 0 : microphones.addEventListener("change", async () => {
|
|
20081
20081
|
var _a2;
|
|
20082
|
-
await this.cameraRecorder.stopRecording();
|
|
20082
|
+
this.cameraRecorder.stopRecording && await this.cameraRecorder.stopRecording();
|
|
20083
20083
|
(_a2 = this.volumeMeter) == null ? void 0 : _a2.stop();
|
|
20084
20084
|
this.cameraRecorder = new CameraRecorder(
|
|
20085
20085
|
{
|
|
@@ -20133,7 +20133,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
20133
20133
|
this.faceDetection.stopDetection();
|
|
20134
20134
|
(_a2 = this.volumeMeter) == null ? void 0 : _a2.stop();
|
|
20135
20135
|
this.volumeMedia = Math.ceil(this.volumeSum / this.volumeCounter);
|
|
20136
|
-
await this.cameraRecorder.stopRecording();
|
|
20136
|
+
this.cameraRecorder.stopRecording && await this.cameraRecorder.stopRecording();
|
|
20137
20137
|
}
|
|
20138
20138
|
applyStyles(element, styles) {
|
|
20139
20139
|
for (const [property, value] of Object.entries(styles)) {
|
|
@@ -20459,7 +20459,7 @@ var AudioRecorder = class {
|
|
|
20459
20459
|
async resumeRecording() {
|
|
20460
20460
|
}
|
|
20461
20461
|
async stopRecording() {
|
|
20462
|
-
await this.recordingStop();
|
|
20462
|
+
this.recordingStop && await this.recordingStop();
|
|
20463
20463
|
}
|
|
20464
20464
|
async saveOnSession(session, start, end) {
|
|
20465
20465
|
session.addRecording({
|
|
@@ -22836,7 +22836,7 @@ var NoiseRecorder = class {
|
|
|
22836
22836
|
}
|
|
22837
22837
|
}
|
|
22838
22838
|
async stopSoundRecord() {
|
|
22839
|
-
await this.audioRecorder.stopRecording();
|
|
22839
|
+
this.audioRecorder.stopRecording && await this.audioRecorder.stopRecording();
|
|
22840
22840
|
this.recordingEndTime = Date.now() - this.examStartTime;
|
|
22841
22841
|
if (this.optionsProctoring.proctoringType !== "REALTIME")
|
|
22842
22842
|
return;
|
|
@@ -23635,19 +23635,29 @@ Error: ` + error
|
|
|
23635
23635
|
|
|
23636
23636
|
// src/proctoring/useProctoring.ts
|
|
23637
23637
|
function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
23638
|
+
if (!proctoringOptions.showConsole) {
|
|
23639
|
+
console.log = () => {
|
|
23640
|
+
};
|
|
23641
|
+
console.warn = () => {
|
|
23642
|
+
};
|
|
23643
|
+
console.error = () => {
|
|
23644
|
+
};
|
|
23645
|
+
}
|
|
23638
23646
|
const proctoring = new Proctoring({
|
|
23639
23647
|
type: enviromentConfig,
|
|
23640
23648
|
clientId: proctoringOptions.clientId,
|
|
23641
23649
|
examId: proctoringOptions.examId,
|
|
23642
23650
|
token: proctoringOptions.token,
|
|
23643
|
-
credentials: proctoringOptions.credentials
|
|
23651
|
+
credentials: proctoringOptions.credentials,
|
|
23652
|
+
showConsole: proctoringOptions.showConsole
|
|
23644
23653
|
});
|
|
23645
23654
|
const checker = new DeviceChecker({
|
|
23646
23655
|
type: enviromentConfig,
|
|
23647
23656
|
clientId: proctoringOptions.clientId,
|
|
23648
23657
|
examId: proctoringOptions.examId,
|
|
23649
23658
|
token: proctoringOptions.token,
|
|
23650
|
-
credentials: proctoringOptions.credentials
|
|
23659
|
+
credentials: proctoringOptions.credentials,
|
|
23660
|
+
showConsole: proctoringOptions.showConsole
|
|
23651
23661
|
});
|
|
23652
23662
|
const photo = new CapturePhoto();
|
|
23653
23663
|
const login = proctoring.login.bind(proctoring);
|
|
@@ -23682,8 +23692,6 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
23682
23692
|
}
|
|
23683
23693
|
|
|
23684
23694
|
// src/index.ts
|
|
23685
|
-
console.log = () => {
|
|
23686
|
-
};
|
|
23687
23695
|
if (typeof window !== "undefined") {
|
|
23688
23696
|
window.useProctoring = useProctoring;
|
|
23689
23697
|
}
|
package/package.json
CHANGED