easyproctor-hml 2.3.2 → 2.4.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.
Files changed (58) hide show
  1. package/dtos/AlertDTO.d.ts +5 -5
  2. package/dtos/SaveScreenDTO.d.ts +5 -5
  3. package/dtos/SessionDTO.d.ts +10 -10
  4. package/dtos/StartProctoringResponse.d.ts +12 -12
  5. package/dtos/UploadDataDTO.d.ts +5 -5
  6. package/errors/errors.d.ts +18 -19
  7. package/esm/index.js +4435 -9304
  8. package/extension/extensionEasyCatcher.d.ts +11 -0
  9. package/extension/{extension.d.ts → extensionEasyProctor.d.ts} +11 -11
  10. package/index.d.ts +1 -1
  11. package/index.js +2445 -10154
  12. package/interfaces/Devices.d.ts +12 -11
  13. package/interfaces/ParamsConfig.d.ts +34 -34
  14. package/modules/BaseDetection.d.ts +39 -39
  15. package/modules/SpyCam.d.ts +31 -31
  16. package/modules/checkPermissions.d.ts +2 -2
  17. package/modules/enumarateDevices.d.ts +2 -2
  18. package/modules/faceDetection.d.ts +15 -15
  19. package/modules/objectDetection.d.ts +15 -15
  20. package/modules/onChangeDevices.d.ts +12 -9
  21. package/new-flow/backend/BackendService.d.ts +47 -48
  22. package/new-flow/backend/SpyCamBackendService.d.ts +27 -27
  23. package/new-flow/checkers/DeviceCheckerService.d.ts +61 -59
  24. package/new-flow/checkers/DeviceCheckerUI.d.ts +51 -51
  25. package/new-flow/download/IDownloadService.d.ts +4 -4
  26. package/new-flow/download/downloadService.d.ts +9 -9
  27. package/new-flow/proctoring/ProctoringRecorder.d.ts +12 -12
  28. package/new-flow/proctoring/ProctoringSession.d.ts +66 -65
  29. package/new-flow/proctoring/ProctoringUploader.d.ts +14 -14
  30. package/new-flow/recorders/AlertRecorder.d.ts +25 -21
  31. package/new-flow/recorders/AudioRecorder.d.ts +24 -24
  32. package/new-flow/recorders/CameraRecorder.d.ts +69 -69
  33. package/new-flow/recorders/IRecorder.d.ts +12 -12
  34. package/new-flow/recorders/NoiseRecorder.d.ts +46 -46
  35. package/new-flow/recorders/ScreenRecorder.d.ts +34 -30
  36. package/new-flow/recorders/VolumeMeter.d.ts +14 -14
  37. package/new-flow/repository/ISessionRepository.d.ts +11 -11
  38. package/new-flow/repository/IndexDbSessionRepository.d.ts +20 -20
  39. package/new-flow/upload/IUploadService.d.ts +10 -10
  40. package/new-flow/upload/UploadService.d.ts +13 -13
  41. package/new-flow/upload/uploadCalback.d.ts +1 -1
  42. package/package.json +2 -5
  43. package/plugins/insights.d.ts +20 -19
  44. package/plugins/recorder.d.ts +9 -9
  45. package/proctoring/Auth.d.ts +11 -11
  46. package/proctoring/CapturePhoto.d.ts +21 -21
  47. package/proctoring/DeviceChecker.d.ts +57 -57
  48. package/proctoring/SignTerm.d.ts +15 -15
  49. package/proctoring/options/ProctoringOptions.d.ts +19 -15
  50. package/proctoring/options/ProctoringVideoOptions.d.ts +8 -8
  51. package/proctoring/proctoring.d.ts +89 -83
  52. package/proctoring/useProctoring.d.ts +26 -25
  53. package/unpkg/easyproctor.min.js +44 -52
  54. package/utils/browserInformations.d.ts +1 -1
  55. package/utils/geolocation.d.ts +15 -15
  56. package/utils/time.d.ts +3 -3
  57. package/utils/verifyVersion.d.ts +1 -1
  58. package/proctoring/ExternalCameraChecker.d.ts +0 -47
@@ -1,11 +1,12 @@
1
- export type Device = {
2
- label: string;
3
- id: string;
4
- };
5
- export default interface Devices {
6
- cameras: Device[];
7
- microphones: Device[];
8
- }
9
- export interface DevicesChanged extends Devices {
10
- status: string;
11
- }
1
+ export type Device = {
2
+ label: string;
3
+ id: string;
4
+ };
5
+ export default interface Devices {
6
+ cameras: Device[];
7
+ microphones: Device[];
8
+ }
9
+ export interface DevicesChanged extends Devices {
10
+ status: string;
11
+ isActiveDevice: boolean;
12
+ }
@@ -1,34 +1,34 @@
1
- export type AudioBehaviourParameters = {
2
- restrictiveness?: 1 | 2 | 3;
3
- onlyTranscribedAudio?: boolean;
4
- recordingBitrate?: number;
5
- noiseLimit?: number;
6
- };
7
- export type ImageBehaviourParameters = {
8
- frames?: number;
9
- useUploadImage?: boolean;
10
- uploadInterval?: number;
11
- saveVideo?: boolean;
12
- };
13
- export type VideoBehaviourParameters = {
14
- minAlertTimePitch?: number;
15
- minAlertTimeYaw?: number;
16
- thresholdYaw?: number;
17
- thresholdPitchUp?: number;
18
- thresholdPitchDown?: number;
19
- environmentCamera?: boolean;
20
- useExamAlert?: boolean;
21
- detectPerson?: boolean;
22
- detectFace?: boolean;
23
- detectCellPhone?: boolean;
24
- detectNoise?: boolean;
25
- detectSpeech?: boolean;
26
- retryEnabled?: boolean;
27
- maxRetries?: number;
28
- };
29
- export default interface IParamsConfig {
30
- audioBehaviourParameters?: AudioBehaviourParameters;
31
- imageBehaviourParameters?: ImageBehaviourParameters;
32
- videoBehaviourParameters?: VideoBehaviourParameters;
33
- spyScanInterval?: number;
34
- }
1
+ export type AudioBehaviourParameters = {
2
+ restrictiveness?: 1 | 2 | 3;
3
+ onlyTranscribedAudio?: boolean;
4
+ recordingBitrate?: number;
5
+ noiseLimit?: number;
6
+ };
7
+ export type ImageBehaviourParameters = {
8
+ frames?: number;
9
+ useUploadImage?: boolean;
10
+ uploadInterval?: number;
11
+ saveVideo?: boolean;
12
+ };
13
+ export type VideoBehaviourParameters = {
14
+ minAlertTimePitch?: number;
15
+ minAlertTimeYaw?: number;
16
+ thresholdYaw?: number;
17
+ thresholdPitchUp?: number;
18
+ thresholdPitchDown?: number;
19
+ environmentCamera?: boolean;
20
+ useExamAlert?: boolean;
21
+ detectPerson?: boolean;
22
+ detectFace?: boolean;
23
+ detectCellPhone?: boolean;
24
+ detectNoise?: boolean;
25
+ detectSpeech?: boolean;
26
+ retryEnabled?: boolean;
27
+ maxRetries?: number;
28
+ };
29
+ export default interface IParamsConfig {
30
+ audioBehaviourParameters?: AudioBehaviourParameters;
31
+ imageBehaviourParameters?: ImageBehaviourParameters;
32
+ videoBehaviourParameters?: VideoBehaviourParameters;
33
+ spyScanInterval?: number;
34
+ }
@@ -1,39 +1,39 @@
1
- import IParamsConfig from "../interfaces/ParamsConfig";
2
- export declare class BaseDetection {
3
- options: {
4
- onRealtimeAlertsCallback?: (response: any) => void;
5
- };
6
- error: any;
7
- video: HTMLMediaElement | null;
8
- liveView: HTMLElement | null;
9
- children: any;
10
- detector: any;
11
- runningMode: any | undefined;
12
- animationFrameId: any;
13
- classVideo: string;
14
- classDiv: string;
15
- detecting: boolean;
16
- paramsConfig: IParamsConfig;
17
- detectorType: string;
18
- modelAssetPath: string;
19
- createdVideo: boolean;
20
- constructor(detectorType: any, modelAssetPath: string, options?: {
21
- onRealtimeAlertsCallback?: (response: any) => void;
22
- }, paramsConfig?: IParamsConfig, classVideo?: string, classDiv?: string);
23
- initializeDetector(): Promise<void>;
24
- stopDetection(): void;
25
- enableCam(cameraStream?: MediaProvider | null | undefined): void;
26
- lastVideoTime: number;
27
- lastExecutionDate: number;
28
- predictWebcam(): Promise<void>;
29
- handleAlert(description: string, type: string): void;
30
- handleOk(description: string, type: string): void;
31
- displayVideoDetections(result: {
32
- detections: any;
33
- }): void;
34
- verify(result: {
35
- detections: any;
36
- }): void;
37
- alertTranslate(description: string): string;
38
- }
39
- export declare function buildVideoPreview(): void;
1
+ import IParamsConfig from "../interfaces/ParamsConfig";
2
+ export declare class BaseDetection {
3
+ options: {
4
+ onRealtimeAlertsCallback?: (response: any) => void;
5
+ };
6
+ error: any;
7
+ video: HTMLMediaElement | null;
8
+ liveView: HTMLElement | null;
9
+ children: any;
10
+ detector: any;
11
+ runningMode: any | undefined;
12
+ animationFrameId: any;
13
+ classVideo: string;
14
+ classDiv: string;
15
+ detecting: boolean;
16
+ paramsConfig: IParamsConfig;
17
+ detectorType: string;
18
+ modelAssetPath: string;
19
+ createdVideo: boolean;
20
+ constructor(detectorType: any, modelAssetPath: string, options?: {
21
+ onRealtimeAlertsCallback?: (response: any) => void;
22
+ }, paramsConfig?: IParamsConfig, classVideo?: string, classDiv?: string);
23
+ initializeDetector(): Promise<void>;
24
+ stopDetection(): void;
25
+ enableCam(cameraStream?: MediaProvider | null | undefined): void;
26
+ lastVideoTime: number;
27
+ lastExecutionDate: number;
28
+ predictWebcam(): Promise<void>;
29
+ handleAlert(description: string, type: string): void;
30
+ handleOk(description: string, type: string): void;
31
+ displayVideoDetections(result: {
32
+ detections: any;
33
+ }): void;
34
+ verify(result: {
35
+ detections: any;
36
+ }): void;
37
+ alertTranslate(description: string): string;
38
+ }
39
+ export declare function buildVideoPreview(): void;
@@ -1,31 +1,31 @@
1
- import { DevicesInterface } from "../new-flow/backend/SpyCamBackendService";
2
- import { ProctoringContext } from "../proctoring/proctoring";
3
- export interface SpyCamDevice {
4
- macAddress: string;
5
- destinationsCount: number;
6
- totalPackages: number;
7
- packageRate: number;
8
- rssi: number;
9
- deviceType: number;
10
- }
11
- export declare class SpyCam {
12
- private backendService;
13
- private readonly context;
14
- private readonly backend;
15
- private proctoringId;
16
- private scanInterval;
17
- private startTime;
18
- private checkSpyCam;
19
- private currentIsPlugged;
20
- private options;
21
- constructor(context: ProctoringContext, options: {
22
- onRealtimeAlertsCallback?: (response: any) => void;
23
- });
24
- setProctoringId(proctoringId: string): void;
25
- isPluggedIn(sendEvent?: boolean): Promise<boolean>;
26
- isAlive(): Promise<boolean>;
27
- connectAndScan(): Promise<any>;
28
- devices({ deviceType, rssiThreshold, packageRateThreshold }: DevicesInterface): Promise<SpyCamDevice[]>;
29
- startCheckSpyCam(spyScanInterval: number, { deviceType, rssiThreshold, packageRateThreshold }: DevicesInterface): Promise<void>;
30
- stopCheckSpyCam(): void;
31
- }
1
+ import { DevicesInterface } from "../new-flow/backend/SpyCamBackendService";
2
+ import { ProctoringContext } from "../proctoring/proctoring";
3
+ export interface SpyCamDevice {
4
+ macAddress: string;
5
+ destinationsCount: number;
6
+ totalPackages: number;
7
+ packageRate: number;
8
+ rssi: number;
9
+ deviceType: number;
10
+ }
11
+ export declare class SpyCam {
12
+ private backendService;
13
+ private readonly context;
14
+ private readonly backend;
15
+ private proctoringId;
16
+ private scanInterval;
17
+ private startTime;
18
+ private checkSpyCam;
19
+ private currentIsPlugged;
20
+ private options;
21
+ constructor(context: ProctoringContext, options: {
22
+ onRealtimeAlertsCallback?: (response: any) => void;
23
+ });
24
+ setProctoringId(proctoringId: string): void;
25
+ isPluggedIn(sendEvent?: boolean): Promise<boolean>;
26
+ isAlive(): Promise<boolean>;
27
+ connectAndScan(): Promise<any>;
28
+ devices({ deviceType, rssiThreshold, packageRateThreshold }: DevicesInterface): Promise<SpyCamDevice[]>;
29
+ startCheckSpyCam(spyScanInterval: number, { deviceType, rssiThreshold, packageRateThreshold }: DevicesInterface): Promise<void>;
30
+ stopCheckSpyCam(): void;
31
+ }
@@ -1,2 +1,2 @@
1
- export declare function checkPermissions(): Promise<boolean>;
2
- export declare function checkIfhasMultipleMonitors(): Promise<boolean>;
1
+ export declare function checkPermissions(): Promise<boolean>;
2
+ export declare function checkIfhasMultipleMonitors(): Promise<boolean>;
@@ -1,2 +1,2 @@
1
- import Devices from "../interfaces/Devices";
2
- export default function enumarateDevices(): Promise<Devices>;
1
+ import Devices from "../interfaces/Devices";
2
+ export default function enumarateDevices(): Promise<Devices>;
@@ -1,15 +1,15 @@
1
- import IParamsConfig from "../interfaces/ParamsConfig";
2
- import { BaseDetection } from "./BaseDetection";
3
- export declare class FaceDetection extends BaseDetection {
4
- constructor(options?: {
5
- onRealtimeAlertsCallback?: (response: any) => void;
6
- }, paramsConfig?: IParamsConfig, classVideo?: string, classDiv?: string);
7
- displayVideoDetections(result: {
8
- detections: any;
9
- }): void;
10
- numFacesSent: number;
11
- emmitedPositionAlert: boolean;
12
- verify(result: {
13
- detections: any;
14
- }): void;
15
- }
1
+ import IParamsConfig from "../interfaces/ParamsConfig";
2
+ import { BaseDetection } from "./BaseDetection";
3
+ export declare class FaceDetection extends BaseDetection {
4
+ constructor(options?: {
5
+ onRealtimeAlertsCallback?: (response: any) => void;
6
+ }, paramsConfig?: IParamsConfig, classVideo?: string, classDiv?: string);
7
+ displayVideoDetections(result: {
8
+ detections: any;
9
+ }): void;
10
+ numFacesSent: number;
11
+ emmitedPositionAlert: boolean;
12
+ verify(result: {
13
+ detections: any;
14
+ }): void;
15
+ }
@@ -1,15 +1,15 @@
1
- import IParamsConfig from "../interfaces/ParamsConfig";
2
- import { BaseDetection } from "./BaseDetection";
3
- export declare class ObjectDetection extends BaseDetection {
4
- constructor(options?: {
5
- onRealtimeAlertsCallback?: (response: any) => void;
6
- }, paramsConfig?: IParamsConfig, classVideo?: string, classDiv?: string);
7
- displayVideoDetections(result: {
8
- detections: any;
9
- }): void;
10
- numPersonsSent: number;
11
- numCellphoneSent: number;
12
- verify(result: {
13
- detections: any;
14
- }): void;
15
- }
1
+ import IParamsConfig from "../interfaces/ParamsConfig";
2
+ import { BaseDetection } from "./BaseDetection";
3
+ export declare class ObjectDetection extends BaseDetection {
4
+ constructor(options?: {
5
+ onRealtimeAlertsCallback?: (response: any) => void;
6
+ }, paramsConfig?: IParamsConfig, classVideo?: string, classDiv?: string);
7
+ displayVideoDetections(result: {
8
+ detections: any;
9
+ }): void;
10
+ numPersonsSent: number;
11
+ numCellphoneSent: number;
12
+ verify(result: {
13
+ detections: any;
14
+ }): void;
15
+ }
@@ -1,9 +1,12 @@
1
- import { ISessionRepository } from "../new-flow/repository/ISessionRepository";
2
- import { ProctoringChangeDevicesOptions } from "../proctoring/proctoring";
3
- export declare class onChangeDevices {
4
- private repositoryDevices;
5
- private proctoringId;
6
- constructor(repositoryDevices: ISessionRepository, proctoringId: string);
7
- startRecording(options: ProctoringChangeDevicesOptions): void;
8
- onChangeDevices(options: ProctoringChangeDevicesOptions): Promise<void>;
9
- }
1
+ import { ISessionRepository } from "../new-flow/repository/ISessionRepository";
2
+ import { ProctoringSessionOptions } from "../proctoring/options/ProctoringOptions";
3
+ import { ProctoringChangeDevicesOptions } from "../proctoring/proctoring";
4
+ export declare class onChangeDevices {
5
+ private repositoryDevices;
6
+ private proctoringId;
7
+ private sessionOptions;
8
+ private allRecorders;
9
+ constructor(repositoryDevices: ISessionRepository, proctoringId: string, sessionOptions: ProctoringSessionOptions, allRecorders: any);
10
+ startRecording(options: ProctoringChangeDevicesOptions): void;
11
+ onChangeDevices(options: ProctoringChangeDevicesOptions): Promise<void>;
12
+ }
@@ -1,48 +1,47 @@
1
- import StartProctoringResponse from "../../dtos/StartProctoringResponse";
2
- import { ProctoringSession } from "../proctoring/ProctoringSession";
3
- import { ProctoringContext } from "../../proctoring/proctoring";
4
- import IParamsConfig from "../../interfaces/ParamsConfig";
5
- export declare class BackendService {
6
- private readonly options;
7
- private readonly baseUrl;
8
- token: string;
9
- constructor(options: {
10
- type: string;
11
- token?: string;
12
- });
13
- selectBaseUrl(type: string): "https://proctoring-api-dev.easyproctor.tech/api" | "https://proctoring-api-hml.easyproctor.tech/api" | "https://proctoring-api.easyproctor.tech/api";
14
- getSocketUrl(): string;
15
- loginAuth(cpf: string, base64: string): Promise<any>;
16
- externalCameraRegister(body: any): Promise<any>;
17
- externalCameraStart(proctoringId: string): Promise<any>;
18
- externalCameraFinish(externalSessionId: string): Promise<any>;
19
- confirmStart(proctoringOptions: {
20
- examId: any;
21
- clientId: any;
22
- token: any;
23
- }, proctoringType: string, latitude?: number, longitude?: number): Promise<StartProctoringResponse>;
24
- getParamsConfig(proctoringOptions: ProctoringContext): Promise<IParamsConfig>;
25
- getSignedUrlImage(token: string, body: any): Promise<string[]>;
26
- getSignedUrl(token: string, file: File, proctoringId?: string): Promise<string>;
27
- saveAlerts(proctoringOptions: ProctoringContext, proctoringSession: ProctoringSession): Promise<void>;
28
- finishAndSendUrls(proctoringOptions: ProctoringContext, proctoringSession: ProctoringSession): Promise<void>;
29
- log(eventName: string, properties?: {
30
- [key: string]: any;
31
- }): Promise<string>;
32
- signTerm(): Promise<string>;
33
- signTermUrl(): Promise<string>;
34
- getServerHour(token: string): Promise<string>;
35
- private makeRequest;
36
- makeRequestAxios<R>(data: {
37
- path: string;
38
- method: "GET" | "POST" | "PUT";
39
- body?: any;
40
- jwt: string;
41
- }): Promise<R>;
42
- makeRequestPUT<R>(data: {
43
- url: string;
44
- method: "PUT";
45
- body?: any;
46
- jwt: string;
47
- }): Promise<R>;
48
- }
1
+ import StartProctoringResponse from "../../dtos/StartProctoringResponse";
2
+ import { ProctoringSession } from "../proctoring/ProctoringSession";
3
+ import { ProctoringContext } from "../../proctoring/proctoring";
4
+ import IParamsConfig from "../../interfaces/ParamsConfig";
5
+ import { ProctoringSessionOptions } from "../../proctoring/options/ProctoringOptions";
6
+ export declare class BackendService {
7
+ private readonly options;
8
+ private readonly baseUrl;
9
+ token: string;
10
+ constructor(options: {
11
+ type: string;
12
+ token?: string;
13
+ });
14
+ selectBaseUrl(type: string): "https://proctoring-api-dev.easyproctor.tech/api" | "https://proctoring-api-hml.easyproctor.tech/api" | "https://proctoring-api.easyproctor.tech/api";
15
+ loginAuth(cpf: string, base64: string): Promise<any>;
16
+ confirmStart(proctoringOptions: {
17
+ examId: any;
18
+ clientId: any;
19
+ token: any;
20
+ }, proctoringType: string, latitude?: number, longitude?: number): Promise<StartProctoringResponse>;
21
+ getParamsConfig(proctoringOptions: ProctoringContext): Promise<IParamsConfig>;
22
+ getSignedUrlImage(token: string, body: any): Promise<string[]>;
23
+ getSignedUrl(token: string, file: File, proctoringId?: string): Promise<string>;
24
+ saveAlerts(proctoringOptions: ProctoringContext, proctoringSession: ProctoringSession): Promise<void>;
25
+ finishAndSendUrls(proctoringOptions: ProctoringContext, sessionOptions: ProctoringSessionOptions): Promise<void>;
26
+ log(eventName: string, properties?: {
27
+ [key: string]: any;
28
+ }): Promise<string>;
29
+ signTerm(): Promise<string>;
30
+ signTermUrl(): Promise<string>;
31
+ startChallenge(body: any): Promise<any>;
32
+ stopChallenge(challengeId: string, body: any): Promise<any>;
33
+ getServerHour(token: string): Promise<string>;
34
+ private makeRequest;
35
+ makeRequestAxios<R>(data: {
36
+ path: string;
37
+ method: "GET" | "POST" | "PUT";
38
+ body?: any;
39
+ jwt: string;
40
+ }): Promise<R>;
41
+ makeRequestPUT<R>(data: {
42
+ url: string;
43
+ method: "PUT";
44
+ body?: any;
45
+ jwt: string;
46
+ }): Promise<R>;
47
+ }
@@ -1,27 +1,27 @@
1
- import type { SpyCamDevice } from "../../modules/SpyCam";
2
- export declare enum DeviceTypeEnum {
3
- UNKNOWN = 0,
4
- ROUTER = 1,
5
- CLIENT_DEVICE = 2,
6
- POTENCIAL_CAMERA = 3
7
- }
8
- export interface DevicesInterface {
9
- deviceType?: DeviceTypeEnum;
10
- rssiThreshold?: number;
11
- packageRateThreshold?: number;
12
- }
13
- export declare class SpyCamBackendService {
14
- private readonly baseUrl;
15
- token: string;
16
- constructor();
17
- isAlive(): Promise<boolean>;
18
- isPluggedIn(): Promise<boolean>;
19
- ConnectAndScan(): Promise<any>;
20
- Devices({ deviceType, rssiThreshold, packageRateThreshold, }: DevicesInterface): Promise<SpyCamDevice[]>;
21
- makeRequestAxios<R>(data: {
22
- path: string;
23
- method: "GET" | "POST" | "PUT";
24
- body?: any;
25
- jwt: string;
26
- }): Promise<R>;
27
- }
1
+ import type { SpyCamDevice } from "../../modules/SpyCam";
2
+ export declare enum DeviceTypeEnum {
3
+ UNKNOWN = 0,
4
+ ROUTER = 1,
5
+ CLIENT_DEVICE = 2,
6
+ POTENCIAL_CAMERA = 3
7
+ }
8
+ export interface DevicesInterface {
9
+ deviceType?: DeviceTypeEnum;
10
+ rssiThreshold?: number;
11
+ packageRateThreshold?: number;
12
+ }
13
+ export declare class SpyCamBackendService {
14
+ private readonly baseUrl;
15
+ token: string;
16
+ constructor();
17
+ isAlive(): Promise<boolean>;
18
+ isPluggedIn(): Promise<boolean>;
19
+ ConnectAndScan(): Promise<any>;
20
+ Devices({ deviceType, rssiThreshold, packageRateThreshold, }: DevicesInterface): Promise<SpyCamDevice[]>;
21
+ makeRequestAxios<R>(data: {
22
+ path: string;
23
+ method: "GET" | "POST" | "PUT";
24
+ body?: any;
25
+ jwt: string;
26
+ }): Promise<R>;
27
+ }
@@ -1,59 +1,61 @@
1
- import { ProctoringSessionOptions } from "../../proctoring/options/ProctoringOptions";
2
- import { ProctoringVideoOptions } from "../../proctoring/options/ProctoringVideoOptions";
3
- import { ProctoringContext } from "../../proctoring/proctoring";
4
- export interface checkDevicesReturn {
5
- cameraId?: string;
6
- microphoneId?: string;
7
- volumeRange?: number;
8
- allowedResolution?: boolean;
9
- allowedAmbient?: boolean;
10
- allowedPositionFace?: boolean;
11
- allowedMicrophone?: boolean;
12
- allowedSpyScan?: boolean | null;
13
- result: boolean;
14
- faceDetectionAlerts?: {
15
- status: string;
16
- description: string;
17
- };
18
- }
19
- export declare class DeviceCheckerService {
20
- private static isModalOpen;
21
- private options;
22
- private videoOptions;
23
- private cameraRecorder;
24
- private DeviceCheckerUI;
25
- private volumeMeter;
26
- private volumeMedia;
27
- private volumeSum;
28
- private volumeCounter;
29
- private faceDetection;
30
- private faceDetectionAlerts;
31
- private microphoneMinThreshold;
32
- private allowedResolution;
33
- private allowedAmbient;
34
- private allowedPositionFace;
35
- private allowedMicrophone;
36
- private allowedSpyScan;
37
- private readonly backend;
38
- private readonly context;
39
- private noiseLimit;
40
- private onUpdateCb;
41
- private spycam;
42
- private spydevices;
43
- constructor(context: ProctoringContext);
44
- runCheckDevicesFlow(options: ProctoringSessionOptions, _videoOptions: Partial<ProctoringVideoOptions>, onModalConfirm: (resolve: (cameraId: string, microphoneId: string) => void) => void, onModalCancel: (reject: (error: Error) => void) => void, onUpdate: (feedback: any) => void): Promise<any>;
45
- private onUpdateCallback;
46
- checkDevices(options?: ProctoringSessionOptions, _videoOptions?: ProctoringVideoOptions): Promise<checkDevicesReturn>;
47
- private isUnderResolution;
48
- private realtimeAlerts;
49
- private videoDeviceInterface;
50
- private audioDeviceInterface;
51
- changeSelectedDevice({ cameraId, microphoneId }: any): Promise<{
52
- cameraStream: MediaStream;
53
- }>;
54
- startCheckDevices(options: ProctoringSessionOptions | undefined, _videoOptions: Partial<ProctoringVideoOptions>): Promise<{
55
- cameraStream: MediaStream;
56
- }>;
57
- closeCheckDevices(): Promise<void>;
58
- private checkSpyScan;
59
- }
1
+ import { ProctoringSessionOptions } from "../../proctoring/options/ProctoringOptions";
2
+ import { ProctoringVideoOptions } from "../../proctoring/options/ProctoringVideoOptions";
3
+ import { ProctoringContext } from "../../proctoring/proctoring";
4
+ export interface checkDevicesReturn {
5
+ cameraId?: string;
6
+ microphoneId?: string;
7
+ volumeRange?: number;
8
+ allowedResolution?: boolean;
9
+ allowedAmbient?: boolean;
10
+ allowedPositionFace?: boolean;
11
+ allowedMicrophone?: boolean;
12
+ allowedSpyScan?: boolean | null;
13
+ result: boolean;
14
+ faceDetectionAlerts?: {
15
+ status: string;
16
+ description: string;
17
+ };
18
+ }
19
+ export declare class DeviceCheckerService {
20
+ private deviceCheckResult;
21
+ private static isModalOpen;
22
+ private options;
23
+ private videoOptions;
24
+ private cameraRecorder;
25
+ private DeviceCheckerUI;
26
+ private volumeMeter;
27
+ private volumeMedia;
28
+ private volumeSum;
29
+ private volumeCounter;
30
+ private faceDetection;
31
+ private faceDetectionAlerts;
32
+ private microphoneMinThreshold;
33
+ private allowedResolution;
34
+ private allowedAmbient;
35
+ private allowedPositionFace;
36
+ private allowedMicrophone;
37
+ private allowedSpyScan;
38
+ private readonly backend;
39
+ private readonly context;
40
+ private noiseLimit;
41
+ private onUpdateCb;
42
+ private spycam;
43
+ private spydevices;
44
+ constructor(context: ProctoringContext);
45
+ getDeviceCheckResult(): any;
46
+ runCheckDevicesFlow(options: ProctoringSessionOptions, _videoOptions: Partial<ProctoringVideoOptions>, onModalConfirm: (resolve: (cameraId: string, microphoneId: string) => void) => void, onModalCancel: (reject: (error: Error) => void) => void, onUpdate: (feedback: any) => void): Promise<any>;
47
+ private onUpdateCallback;
48
+ checkDevices(options?: ProctoringSessionOptions, _videoOptions?: ProctoringVideoOptions): Promise<checkDevicesReturn>;
49
+ private isUnderResolution;
50
+ private realtimeAlerts;
51
+ private videoDeviceInterface;
52
+ private audioDeviceInterface;
53
+ changeSelectedDevice({ cameraId, microphoneId }: any): Promise<{
54
+ cameraStream: MediaStream;
55
+ }>;
56
+ startCheckDevices(options: ProctoringSessionOptions | undefined, _videoOptions: Partial<ProctoringVideoOptions>): Promise<{
57
+ cameraStream: MediaStream;
58
+ }>;
59
+ closeCheckDevices(): Promise<void>;
60
+ private checkSpyScan;
61
+ }