easyproctor-hml 3.1.0 → 3.2.1

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.
@@ -34,7 +34,10 @@ export declare class NoiseRecorder implements IRecorder {
34
34
  private readonly MAX_PRE_ROLL_CHUNKS;
35
35
  private lastNoiseTime;
36
36
  private readonly SILENCE_THRESHOLD;
37
+ private readonly MAX_RECORD_DURATION;
37
38
  private filesToUpload;
39
+ private acumulatedMuteTime;
40
+ private startMuteTime;
38
41
  constructor(optionsProctoring: ProctoringSessionOptions, proctoringSession: ProctoringSession, paramsConfig: IParamsConfig, cameraRecorder: CameraRecorder, onRealtimeAlertsCallback: (response: any) => void, backend?: BackendService, backendToken?: string);
39
42
  setProctoringId(proctoringId: string): void;
40
43
  startRecording(): Promise<void>;
@@ -1,6 +1,8 @@
1
1
  import { RecordRTCPromisesHandler } from "recordrtc";
2
2
  import { ProctoringSession } from "../proctoring/ProctoringSession";
3
3
  import { IRecorder } from "./IRecorder";
4
+ import IParamsConfig from "../../interfaces/ParamsConfig";
5
+ import { ProctoringVideoOptions } from "../../proctoring/options/ProctoringVideoOptions";
4
6
  export declare class ScreenRecorder implements IRecorder {
5
7
  private blobs;
6
8
  private blobsFinal;
@@ -8,24 +10,25 @@ export declare class ScreenRecorder implements IRecorder {
8
10
  recorder: RecordRTCPromisesHandler | undefined;
9
11
  screenStream: MediaStream | undefined;
10
12
  proctoringId: string | undefined;
13
+ isRecording: boolean;
11
14
  startTime: Date;
12
15
  duration: number;
16
+ private videoOptions;
17
+ private paramsConfig;
13
18
  constructor(options: {
14
19
  allowOnlyFirstMonitor: boolean;
15
20
  allowMultipleMonitors: boolean;
16
- screenRecorderOptions: {
17
- width: number;
18
- height: number;
19
- };
20
21
  onStopSharingScreenCallback: () => void;
21
22
  onBufferSizeError?: boolean;
22
23
  onBufferSizeErrorCallback: () => void;
23
- });
24
+ }, videoOptions: ProctoringVideoOptions, paramsConfig?: IParamsConfig);
24
25
  file?: File;
25
26
  recordingStart: () => any;
26
27
  recordingStop: () => any;
27
28
  recordingPause: () => any;
28
29
  recordingResume: () => any;
30
+ getStartTime: () => any;
31
+ getDuration: () => any;
29
32
  setProctoringId(proctoringId: string): void;
30
33
  startRecording(): Promise<void>;
31
34
  pauseRecording(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor-hml",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",
@@ -2,8 +2,10 @@ export declare function setRecorderProctoringId(id: string): void;
2
2
  export interface RecorderOptions {
3
3
  timeslice?: number;
4
4
  onChunkAvailable?: (blob: Blob, chunkIndex: number) => void;
5
+ quality?: number;
6
+ timeoutMultiplierFactor?: number;
5
7
  }
6
- export default function recorder(stream: MediaStream, buffer: Blob[], onBufferSizeError?: boolean, onBufferSizeErrorCallback?: (e?: any) => void, audio?: boolean, recorderOpts?: RecorderOptions): {
8
+ export default function recorder(stream: MediaStream, buffer: Blob[], onBufferSizeError?: boolean, onBufferSizeErrorCallback?: (e?: any) => void, recorderOpts?: RecorderOptions): {
7
9
  startRecording: () => Promise<void>;
8
10
  stopRecording: () => Promise<void>;
9
11
  pauseRecording: () => Promise<void>;
@@ -5,7 +5,7 @@ export interface ProctoringSessionOptions {
5
5
  allowOnlyFirstMonitor?: boolean;
6
6
  captureScreen?: boolean;
7
7
  noiseLimit?: number;
8
- proctoringType: "VIDEO" | "IMAGE" | "REALTIME";
8
+ proctoringType: "VIDEO" | "REALTIME";
9
9
  insights: string;
10
10
  onBufferSizeError?: boolean;
11
11
  useGeolocation?: boolean;
@@ -13,10 +13,6 @@ export interface ProctoringSessionOptions {
13
13
  useExternalCamera?: boolean;
14
14
  useChallenge?: boolean;
15
15
  useSafeBrowserAPI?: boolean;
16
- screenRecorderOptions?: {
17
- width: number;
18
- height: number;
19
- };
20
16
  auto?: boolean;
21
17
  }
22
18
  export declare const getDefaultProctoringOptions: ProctoringSessionOptions;