easyproctor 1.1.16 → 2.0.0

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.
@@ -26,7 +26,7 @@ export declare class BaseDetection {
26
26
  lastExecutionDate: number;
27
27
  predictWebcam(): Promise<void>;
28
28
  handleAlert(description: string, type: string): void;
29
- handleOk(type: string): void;
29
+ handleOk(description: string, type: string): void;
30
30
  displayVideoDetections(result: {
31
31
  detections: any;
32
32
  }): void;
@@ -1,12 +1,16 @@
1
- import { IMicRecorder } from "../../plugins/MicRecorder2";
2
1
  import { ProctoringSession } from "../proctoring/ProctoringSession";
3
2
  import { IRecorder } from "./IRecorder";
4
3
  import { AudioBehaviourParameters } from "../../interfaces/ParamsConfig";
5
4
  export declare class AudioRecorder implements IRecorder {
6
5
  blobs: Blob[];
7
- recorder?: IMicRecorder;
6
+ recorder?: any;
7
+ audioStream: MediaStream;
8
+ private options;
8
9
  private audioParams;
9
- constructor(audioParams?: AudioBehaviourParameters);
10
+ constructor(options?: {
11
+ cameraId?: string;
12
+ microphoneId?: string;
13
+ }, audioParams?: AudioBehaviourParameters);
10
14
  recordingStart: () => any;
11
15
  recordingStop: () => any;
12
16
  recordingPause: () => any;
@@ -6,6 +6,8 @@ import { UploadService } from "../upload/UploadService";
6
6
  import IParamsConfig from "../../interfaces/ParamsConfig";
7
7
  import { ProctoringVideoOptions } from "../../proctoring/options/ProctoringVideoOptions";
8
8
  import { DevicesChanged } from "../../interfaces/Devices";
9
+ import { ObjectDetection } from "../../modules/objectDetection";
10
+ import { FaceDetection } from "../../modules/faceDetection";
9
11
  export declare class CameraRecorder implements IRecorder {
10
12
  private blobs;
11
13
  private paramsConfig;
@@ -24,6 +26,8 @@ export declare class CameraRecorder implements IRecorder {
24
26
  upload: UploadService | undefined;
25
27
  video: HTMLVideoElement;
26
28
  canvas: HTMLCanvasElement;
29
+ faceDetection: FaceDetection;
30
+ objectDetection: ObjectDetection;
27
31
  filesToUpload: File[];
28
32
  private intervalNoiseDetection;
29
33
  private volumeMeter;
@@ -22,8 +22,9 @@ export declare class NoiseRecorder implements IRecorder {
22
22
  private recordingEndTime;
23
23
  private isSpeech;
24
24
  private audioClassifier;
25
- private scriptProcessor;
26
25
  private audioClassificationResult;
26
+ private context;
27
+ private audioWorkletNode;
27
28
  upload: UploadService | undefined;
28
29
  backend: BackendService | undefined;
29
30
  backendToken: string | undefined;
@@ -4,10 +4,11 @@ export interface VolumeMeterOptions {
4
4
  export declare class VolumeMeter {
5
5
  private volume;
6
6
  private stream;
7
- private scriptProcessor;
7
+ private analyser;
8
+ private animationFrameId;
8
9
  constructor(stream: MediaStream);
9
10
  start(options?: VolumeMeterOptions): Promise<any>;
10
11
  stop(): void;
11
- getVolume(): any;
12
+ getVolume(): number | null;
12
13
  private setVolume;
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor",
3
- "version": "1.1.16",
3
+ "version": "2.0.0",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",
@@ -23,10 +23,8 @@
23
23
  "license": "ISC",
24
24
  "devDependencies": {
25
25
  "@types/dom-mediacapture-record": "^1.0.11",
26
- "@types/ebml": "^3.0.2",
27
26
  "@types/file-saver": "^2.0.7",
28
27
  "@types/recordrtc": "^5.6.8",
29
- "@types/w3c-image-capture": "^1.0.7",
30
28
  "@typescript-eslint/eslint-plugin": "^5.8.0",
31
29
  "@typescript-eslint/parser": "^5.8.0",
32
30
  "esbuild": "^0.14.47",
@@ -39,10 +37,7 @@
39
37
  "@mediapipe/tasks-audio": "^0.10.9",
40
38
  "@mediapipe/tasks-vision": "^0.10.9",
41
39
  "axios": "^1.1.3",
42
- "buffer": "^6.0.3",
43
- "ebml": "^3.0.0",
44
40
  "file-saver": "^2.0.5",
45
- "recordrtc": "^5.6.2",
46
- "ts-ebml": "^2.0.2"
41
+ "recordrtc": "^5.6.2"
47
42
  }
48
43
  }
@@ -15,6 +15,10 @@ export interface checkDevicesReturn {
15
15
  allowedPositionFace: boolean;
16
16
  allowedMicrophone: boolean;
17
17
  result: boolean;
18
+ faceDetectionAlerts: {
19
+ status: string;
20
+ description: string;
21
+ };
18
22
  }
19
23
  export declare class DeviceChecker {
20
24
  private options;
@@ -24,6 +28,8 @@ export declare class DeviceChecker {
24
28
  private volumeMedia;
25
29
  private volumeSum;
26
30
  private volumeCounter;
31
+ private faceDetection;
32
+ private faceDetectionAlerts;
27
33
  private microphoneMinThreshold;
28
34
  private allowedResolution;
29
35
  private allowedAmbient;
@@ -12,12 +12,6 @@ export declare function useProctoring(proctoringOptions: ProctoringContext, envi
12
12
  onRealtimeAlerts: (options?: import("./proctoring").ProctoringRealtimeAlertsOptions) => Promise<void>;
13
13
  checkDevices: (options: import("./options/ProctoringOptions").ProctoringSessionOptions | undefined, _videoOptions: import("./options/ProctoringVideoOptions").ProctoringVideoOptions) => Promise<import("./DeviceChecker").checkDevicesReturn>;
14
14
  capturePhoto: (title: string, subtitle: string, resolution?: import("./CapturePhoto").IResolution) => Promise<import("./CapturePhoto").cameraInterface>;
15
- pause: () => Promise<void>;
16
- resume: () => Promise<{
17
- cameraStream: MediaStream;
18
- audioStream?: MediaStream | undefined;
19
- _screenStream: MediaStream | undefined;
20
- }>;
21
15
  enumarateDevices: typeof enumarateDevices;
22
16
  checkPermissions: typeof checkPermissions;
23
17
  checkIfhasMultipleMonitors: typeof checkIfhasMultipleMonitors;