easyproctor-hml 0.0.24 → 0.0.26
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 +6 -2
- package/index.js +6 -2
- package/interfaces/ProctoringConfig.d.ts +10 -0
- package/interfaces/ProctoringRecord.d.ts +15 -0
- package/modules/database.d.ts +7 -0
- package/modules/http.d.ts +19 -0
- package/modules/recorder copy.d.ts +1 -0
- package/modules/recorder.d.ts +1 -0
- package/modules/recorderAudio.d.ts +1 -0
- package/modules/startAudioCapture.d.ts +2 -0
- package/modules/startCameraCapture.d.ts +10 -0
- package/modules/startScreenCapture.d.ts +7 -0
- package/modules/upload.d.ts +8 -0
- package/modules/upload_sdk.d.ts +8 -0
- package/package.json +1 -1
- package/unpkg/easyproctor.min.js +14 -14
- package/unpkg/easyproctor.min.js.map +7 -0
package/esm/index.js
CHANGED
|
@@ -29571,10 +29571,13 @@ var Proctoring = class {
|
|
|
29571
29571
|
this.sessionOptions = { ...getDefaultProctoringOptions, ...options };
|
|
29572
29572
|
this.videoOptions = validatePartialVideoOptions(_videoOptions);
|
|
29573
29573
|
await this.initConfig();
|
|
29574
|
+
console.log("verifyMultipleMonitors");
|
|
29575
|
+
console.log("this.state" + this.state);
|
|
29574
29576
|
await this.verifyMultipleMonitors(this.sessionOptions);
|
|
29575
29577
|
if (this.state != "Stop" /* Stop */) {
|
|
29576
29578
|
throw PROCTORING_ALREADY_STARTED;
|
|
29577
29579
|
}
|
|
29580
|
+
console.log("change Status");
|
|
29578
29581
|
this.state = "Starting" /* Starting */;
|
|
29579
29582
|
if (await this.repository.hasSessions()) {
|
|
29580
29583
|
await this.repository.clear();
|
|
@@ -29776,8 +29779,9 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
29776
29779
|
|
|
29777
29780
|
// src/index.ts
|
|
29778
29781
|
var ebmlScript = document.createElement("script");
|
|
29779
|
-
ebmlScript.
|
|
29780
|
-
|
|
29782
|
+
ebmlScript.setAttribute("async", "");
|
|
29783
|
+
ebmlScript.setAttribute("src", "https://www.webrtc-experiment.com/EBML.js");
|
|
29784
|
+
document.body.appendChild(ebmlScript);
|
|
29781
29785
|
if (typeof window !== "undefined") {
|
|
29782
29786
|
window.useProctoring = useProctoring;
|
|
29783
29787
|
}
|
package/index.js
CHANGED
|
@@ -41105,10 +41105,13 @@ var Proctoring = class {
|
|
|
41105
41105
|
this.sessionOptions = { ...getDefaultProctoringOptions, ...options };
|
|
41106
41106
|
this.videoOptions = validatePartialVideoOptions(_videoOptions);
|
|
41107
41107
|
await this.initConfig();
|
|
41108
|
+
console.log("verifyMultipleMonitors");
|
|
41109
|
+
console.log("this.state" + this.state);
|
|
41108
41110
|
await this.verifyMultipleMonitors(this.sessionOptions);
|
|
41109
41111
|
if (this.state != "Stop" /* Stop */) {
|
|
41110
41112
|
throw PROCTORING_ALREADY_STARTED;
|
|
41111
41113
|
}
|
|
41114
|
+
console.log("change Status");
|
|
41112
41115
|
this.state = "Starting" /* Starting */;
|
|
41113
41116
|
if (await this.repository.hasSessions()) {
|
|
41114
41117
|
await this.repository.clear();
|
|
@@ -41310,8 +41313,9 @@ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
|
|
|
41310
41313
|
|
|
41311
41314
|
// src/index.ts
|
|
41312
41315
|
var ebmlScript = document.createElement("script");
|
|
41313
|
-
ebmlScript.
|
|
41314
|
-
|
|
41316
|
+
ebmlScript.setAttribute("async", "");
|
|
41317
|
+
ebmlScript.setAttribute("src", "https://www.webrtc-experiment.com/EBML.js");
|
|
41318
|
+
document.body.appendChild(ebmlScript);
|
|
41315
41319
|
if (typeof window !== "undefined") {
|
|
41316
41320
|
window.useProctoring = useProctoring;
|
|
41317
41321
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import AlertDTO from "../dtos/AlertDTO";
|
|
2
|
+
export interface ProctoringSession {
|
|
3
|
+
id: string;
|
|
4
|
+
screenFile: File | undefined;
|
|
5
|
+
cameraFile: File;
|
|
6
|
+
audioFile: File;
|
|
7
|
+
alerts: AlertDTO[];
|
|
8
|
+
start: string;
|
|
9
|
+
end: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ProctoringRecord {
|
|
12
|
+
examId: string;
|
|
13
|
+
id: string;
|
|
14
|
+
sessions: ProctoringSession[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProctoringRecord } from "../interfaces/ProctoringRecord";
|
|
2
|
+
declare type Tables = "exams";
|
|
3
|
+
export declare function initializeDatabase(table: string): Promise<IDBObjectStore>;
|
|
4
|
+
export declare function insertRecord(table: Tables, data: ProctoringRecord): Promise<void>;
|
|
5
|
+
export declare function getRecord(table: Tables): Promise<ProctoringRecord | null>;
|
|
6
|
+
export declare function clearBuffers(table: Tables): Promise<void>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function setBaseUrl(homol: boolean): Promise<void>;
|
|
2
|
+
export default function makeRequest<R>(data: {
|
|
3
|
+
url: string;
|
|
4
|
+
method: "GET" | "POST";
|
|
5
|
+
body?: any;
|
|
6
|
+
jwt: string;
|
|
7
|
+
}): Promise<R>;
|
|
8
|
+
export declare function makeRequestPUT<R>(data: {
|
|
9
|
+
url: string;
|
|
10
|
+
method: "PUT";
|
|
11
|
+
body?: any;
|
|
12
|
+
jwt: string;
|
|
13
|
+
}): Promise<R>;
|
|
14
|
+
export declare function makeRequestAxios<R>(data: {
|
|
15
|
+
url: string;
|
|
16
|
+
method: "GET" | "POST" | "PUT";
|
|
17
|
+
body?: any;
|
|
18
|
+
jwt: string;
|
|
19
|
+
}): Promise<R>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function recorder(stream: MediaStream, buffer: Blob[]): () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function recorder(stream: MediaStream, buffer: Blob[]): () => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function recorder(stream: MediaStream, buffer: Blob[]): () => Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProctoringConfig } from '../interfaces/ProctoringConfig';
|
|
2
|
+
declare type UploadData = {
|
|
3
|
+
file: File;
|
|
4
|
+
onProgress?: (progress: number) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function setConfiguration(_account: string, _cointainerName: string, _sas: string): Promise<void>;
|
|
7
|
+
export default function upload(data: UploadData, proctoringId: string, config: ProctoringConfig, proctoringToken: string): Promise<void>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProctoringConfig } from '../interfaces/ProctoringConfig';
|
|
2
|
+
declare type UploadData = {
|
|
3
|
+
file: File;
|
|
4
|
+
onProgress?: (progress: number) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function setConfiguration(_account: string, _cointainerName: string, _sas: string): Promise<void>;
|
|
7
|
+
export default function upload(data: UploadData, proctoringId: string, config: ProctoringConfig, proctoringToken: string): Promise<void>;
|
|
8
|
+
export {};
|