easyproctor 1.0.0 → 1.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 +2 -5
- package/esm/index.js +5 -11
- package/index.js +5 -11
- package/new-flow/backend/BackendService.d.ts +2 -3
- package/package.json +1 -1
- package/proctoring/proctoring.d.ts +1 -6
- package/proctoring/useProctoring.d.ts +1 -2
- package/unpkg/easyproctor.min.js +11 -11
package/README.md
CHANGED
|
@@ -219,12 +219,9 @@ const {
|
|
|
219
219
|
});
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
## Release Note V 1.0.
|
|
222
|
+
## Release Note V 1.0.1
|
|
223
223
|
|
|
224
|
-
-
|
|
225
|
-
- Adicionado mais eventos da Azure
|
|
226
|
-
- Correção de eventos da Azure
|
|
227
|
-
- Atualização da comunicação com a Extensão do Chrome
|
|
224
|
+
- Retirada de requisição da hora no finish
|
|
228
225
|
|
|
229
226
|
|
|
230
227
|
## License
|
package/esm/index.js
CHANGED
|
@@ -14508,7 +14508,6 @@ function recorder(stream, buffer, audio = false) {
|
|
|
14508
14508
|
}
|
|
14509
14509
|
function resumeRecording() {
|
|
14510
14510
|
return new Promise((resolve) => {
|
|
14511
|
-
console.log("Resumindo...");
|
|
14512
14511
|
if (mediaRecorder.state == "paused") {
|
|
14513
14512
|
mediaRecorder.resume();
|
|
14514
14513
|
resolve();
|
|
@@ -14558,14 +14557,10 @@ var CameraRecorder = class {
|
|
|
14558
14557
|
await this.recordingStop();
|
|
14559
14558
|
}
|
|
14560
14559
|
async pauseRecording() {
|
|
14561
|
-
console.log("Pausing...");
|
|
14562
14560
|
await this.recordingPause();
|
|
14563
|
-
console.log("Paused");
|
|
14564
14561
|
}
|
|
14565
14562
|
async resumeRecording() {
|
|
14566
|
-
console.log("Resuming...");
|
|
14567
14563
|
await this.recordingResume();
|
|
14568
|
-
console.log("Resumed");
|
|
14569
14564
|
}
|
|
14570
14565
|
async saveOnSession(session) {
|
|
14571
14566
|
const settings = this.cameraStream.getVideoTracks()[0].getSettings();
|
|
@@ -24725,11 +24720,11 @@ var BackendService = class {
|
|
|
24725
24720
|
this.baseUrl = this.selectBaseUrl(options.type);
|
|
24726
24721
|
}
|
|
24727
24722
|
selectBaseUrl(type) {
|
|
24728
|
-
if (type === "dev"
|
|
24723
|
+
if (type === "dev") {
|
|
24729
24724
|
return DEV_BASE_URL;
|
|
24730
|
-
} else if (type === "homol"
|
|
24725
|
+
} else if (type === "homol") {
|
|
24731
24726
|
return HOMOL_BASE_URL;
|
|
24732
|
-
} else if (type === "prod"
|
|
24727
|
+
} else if (type === "prod") {
|
|
24733
24728
|
return PROD_BASE_URL;
|
|
24734
24729
|
} else {
|
|
24735
24730
|
return PROD_BASE_URL;
|
|
@@ -24803,8 +24798,7 @@ var BackendService = class {
|
|
|
24803
24798
|
}
|
|
24804
24799
|
async finishAndSendUrls(proctoringOptions, proctoringSession) {
|
|
24805
24800
|
var _a2, _b, _c;
|
|
24806
|
-
const
|
|
24807
|
-
const serverTime = serverHour ? new Date(serverHour).toISOString() : new Date().toISOString();
|
|
24801
|
+
const serverTime = new Date().toISOString();
|
|
24808
24802
|
const videoCameraUpload = (_a2 = proctoringSession.recordings.find((e) => e.origin === "Camera" /* Camera */)) == null ? void 0 : _a2.upload;
|
|
24809
24803
|
const audioCameraUpload = (_b = proctoringSession.recordings.find((e) => e.origin === "Mic" /* Mic */)) == null ? void 0 : _b.upload;
|
|
24810
24804
|
const videoScreenUpload = (_c = proctoringSession.recordings.find((e) => e.origin === "Screen" /* Screen */)) == null ? void 0 : _c.upload;
|
|
@@ -25493,7 +25487,7 @@ Upload Services: ${uploaderServices}`, this.serviceType);
|
|
|
25493
25487
|
};
|
|
25494
25488
|
|
|
25495
25489
|
// src/proctoring/useProctoring.ts
|
|
25496
|
-
function useProctoring(proctoringOptions, enviromentConfig = "prod"
|
|
25490
|
+
function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
25497
25491
|
const proctoring = new Proctoring({
|
|
25498
25492
|
type: enviromentConfig,
|
|
25499
25493
|
clientId: proctoringOptions.clientId,
|
package/index.js
CHANGED
|
@@ -33449,7 +33449,6 @@ function recorder(stream3, buffer, audio = false) {
|
|
|
33449
33449
|
}
|
|
33450
33450
|
function resumeRecording() {
|
|
33451
33451
|
return new Promise((resolve) => {
|
|
33452
|
-
console.log("Resumindo...");
|
|
33453
33452
|
if (mediaRecorder.state == "paused") {
|
|
33454
33453
|
mediaRecorder.resume();
|
|
33455
33454
|
resolve();
|
|
@@ -33499,14 +33498,10 @@ var CameraRecorder = class {
|
|
|
33499
33498
|
await this.recordingStop();
|
|
33500
33499
|
}
|
|
33501
33500
|
async pauseRecording() {
|
|
33502
|
-
console.log("Pausing...");
|
|
33503
33501
|
await this.recordingPause();
|
|
33504
|
-
console.log("Paused");
|
|
33505
33502
|
}
|
|
33506
33503
|
async resumeRecording() {
|
|
33507
|
-
console.log("Resuming...");
|
|
33508
33504
|
await this.recordingResume();
|
|
33509
|
-
console.log("Resumed");
|
|
33510
33505
|
}
|
|
33511
33506
|
async saveOnSession(session) {
|
|
33512
33507
|
const settings = this.cameraStream.getVideoTracks()[0].getSettings();
|
|
@@ -36259,11 +36254,11 @@ var BackendService = class {
|
|
|
36259
36254
|
this.baseUrl = this.selectBaseUrl(options.type);
|
|
36260
36255
|
}
|
|
36261
36256
|
selectBaseUrl(type) {
|
|
36262
|
-
if (type === "dev"
|
|
36257
|
+
if (type === "dev") {
|
|
36263
36258
|
return DEV_BASE_URL;
|
|
36264
|
-
} else if (type === "homol"
|
|
36259
|
+
} else if (type === "homol") {
|
|
36265
36260
|
return HOMOL_BASE_URL;
|
|
36266
|
-
} else if (type === "prod"
|
|
36261
|
+
} else if (type === "prod") {
|
|
36267
36262
|
return PROD_BASE_URL;
|
|
36268
36263
|
} else {
|
|
36269
36264
|
return PROD_BASE_URL;
|
|
@@ -36337,8 +36332,7 @@ var BackendService = class {
|
|
|
36337
36332
|
}
|
|
36338
36333
|
async finishAndSendUrls(proctoringOptions, proctoringSession) {
|
|
36339
36334
|
var _a, _b, _c;
|
|
36340
|
-
const
|
|
36341
|
-
const serverTime = serverHour ? new Date(serverHour).toISOString() : new Date().toISOString();
|
|
36335
|
+
const serverTime = new Date().toISOString();
|
|
36342
36336
|
const videoCameraUpload = (_a = proctoringSession.recordings.find((e) => e.origin === "Camera" /* Camera */)) == null ? void 0 : _a.upload;
|
|
36343
36337
|
const audioCameraUpload = (_b = proctoringSession.recordings.find((e) => e.origin === "Mic" /* Mic */)) == null ? void 0 : _b.upload;
|
|
36344
36338
|
const videoScreenUpload = (_c = proctoringSession.recordings.find((e) => e.origin === "Screen" /* Screen */)) == null ? void 0 : _c.upload;
|
|
@@ -37027,7 +37021,7 @@ Upload Services: ${uploaderServices}`, this.serviceType);
|
|
|
37027
37021
|
};
|
|
37028
37022
|
|
|
37029
37023
|
// src/proctoring/useProctoring.ts
|
|
37030
|
-
function useProctoring(proctoringOptions, enviromentConfig = "prod"
|
|
37024
|
+
function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
37031
37025
|
const proctoring = new Proctoring({
|
|
37032
37026
|
type: enviromentConfig,
|
|
37033
37027
|
clientId: proctoringOptions.clientId,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import StartProctoringResponse from "../../dtos/StartProctoringResponse";
|
|
2
|
-
import { EnviromentType } from "../../proctoring/proctoring";
|
|
3
2
|
import { ProctoringSession } from "../proctoring/ProctoringSession";
|
|
4
3
|
export declare class BackendService {
|
|
5
4
|
private readonly options;
|
|
6
5
|
private readonly baseUrl;
|
|
7
6
|
constructor(options: {
|
|
8
|
-
type:
|
|
7
|
+
type: string;
|
|
9
8
|
});
|
|
10
|
-
selectBaseUrl(type:
|
|
9
|
+
selectBaseUrl(type: string): "https://proctoring-api-dev.easyproctor.tech/api" | "https://proctoring-api-hml.easyproctor.tech/api" | "https://proctoring-api.easyproctor.tech/api";
|
|
11
10
|
confirmStart(proctoringOptions: {
|
|
12
11
|
examId: any;
|
|
13
12
|
clientId: any;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { DevicesChanged } from "../interfaces/Devices";
|
|
|
3
3
|
import { ProctoringSessionOptions } from "./options/ProctoringOptions";
|
|
4
4
|
import { ProctoringVideoOptions } from "./options/ProctoringVideoOptions";
|
|
5
5
|
export interface ProctoringContext {
|
|
6
|
-
type:
|
|
6
|
+
type: string;
|
|
7
7
|
examId: string;
|
|
8
8
|
clientId: string;
|
|
9
9
|
token: string;
|
|
@@ -21,11 +21,6 @@ export declare enum ProctoringState {
|
|
|
21
21
|
Stopping = "Stopping",
|
|
22
22
|
Paused = "Paused"
|
|
23
23
|
}
|
|
24
|
-
export declare enum EnviromentType {
|
|
25
|
-
dev = "dev",
|
|
26
|
-
homol = "homol",
|
|
27
|
-
prod = "prod"
|
|
28
|
-
}
|
|
29
24
|
export declare enum ServiceType {
|
|
30
25
|
Download = "Download",
|
|
31
26
|
Upload = "Upload"
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { checkIfhasMultipleMonitors, checkPermissions } from "../modules/checkPermissions";
|
|
2
2
|
import enumarateDevices from "../modules/enumarateDevices";
|
|
3
|
-
import { EnviromentType } from "./proctoring";
|
|
4
3
|
export declare function useProctoring(proctoringOptions: {
|
|
5
4
|
examId: string;
|
|
6
5
|
clientId: string;
|
|
7
6
|
token: string;
|
|
8
|
-
}, enviromentConfig?:
|
|
7
|
+
}, enviromentConfig?: string): {
|
|
9
8
|
start: (options?: import("./options/ProctoringOptions").ProctoringSessionOptions, _videoOptions?: Partial<import("./options/ProctoringVideoOptions").ProctoringVideoOptions>) => Promise<import("../dtos/StartProctoringResponse").default>;
|
|
10
9
|
finish: (options?: import("./proctoring").ProctoringFinisherOptions) => Promise<void>;
|
|
11
10
|
onFocus: (cb: () => void) => void;
|