easyproctor 0.0.87 → 0.0.89
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 +6 -2
- package/esm/index.js +9015 -8847
- package/extension/extension.d.ts +11 -0
- package/index.js +32559 -32391
- package/interfaces/Devices.d.ts +4 -2
- package/modules/onChangeDevices.d.ts +9 -0
- package/new-flow/proctoring/ProctoringUploader.d.ts +1 -1
- package/new-flow/recorders/AudioRecorder.d.ts +0 -1
- package/new-flow/repository/ISessionRepository.d.ts +4 -2
- package/new-flow/repository/IndexDbSessionRepository.d.ts +5 -2
- package/package.json +1 -1
- package/plugins/insights.d.ts +4 -1
- package/proctoring/DeviceChecker.d.ts +5 -1
- package/proctoring/proctoring.d.ts +12 -2
- package/proctoring/useProctoring.d.ts +2 -5
- package/unpkg/easyproctor.min.js +16 -16
package/interfaces/Devices.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type Device = {
|
|
1
|
+
export declare type Device = {
|
|
2
2
|
label: string;
|
|
3
3
|
id: string;
|
|
4
4
|
};
|
|
@@ -6,4 +6,6 @@ export default interface Devices {
|
|
|
6
6
|
cameras: Device[];
|
|
7
7
|
microphones: Device[];
|
|
8
8
|
}
|
|
9
|
-
export {
|
|
9
|
+
export interface DevicesChanged extends Devices {
|
|
10
|
+
status: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
}
|
|
@@ -6,7 +6,7 @@ export declare class ProctoringUploader {
|
|
|
6
6
|
private session;
|
|
7
7
|
private uploadServices;
|
|
8
8
|
constructor(session: ProctoringSession, uploadServices: IUploadService[] | IDownloadService[]);
|
|
9
|
-
upload(
|
|
9
|
+
upload(token: string, progress?: ProgressCallback): Promise<void>;
|
|
10
10
|
private uploadRecordings;
|
|
11
11
|
private uploadAllFiles;
|
|
12
12
|
private uploadFile;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import Devices, { DevicesChanged } from "../../interfaces/Devices";
|
|
1
2
|
import { ProctoringSession } from "../proctoring/ProctoringSession";
|
|
2
3
|
export interface ISessionRepository {
|
|
3
|
-
save(data: ProctoringSession): Promise<void>;
|
|
4
|
-
list(): Promise<ProctoringSession[]>;
|
|
4
|
+
save(data: Devices | DevicesChanged | ProctoringSession): Promise<void>;
|
|
5
|
+
list(): Promise<ProctoringSession[] | Devices[]>;
|
|
5
6
|
delete(id: string): Promise<void>;
|
|
6
7
|
get(id: string): Promise<ProctoringSession | undefined>;
|
|
8
|
+
getDevices(id: string): Promise<Devices | undefined>;
|
|
7
9
|
clear(): Promise<void>;
|
|
8
10
|
hasSessions(): Promise<boolean>;
|
|
9
11
|
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import Devices, { DevicesChanged } from "../../interfaces/Devices";
|
|
1
2
|
import { ProctoringSession } from "../proctoring/ProctoringSession";
|
|
2
3
|
import { ISessionRepository } from "./ISessionRepository";
|
|
3
4
|
export declare class IndexDbSessionRepository implements ISessionRepository {
|
|
4
5
|
private dbName;
|
|
5
6
|
private dbVersion;
|
|
6
7
|
private storeName;
|
|
7
|
-
|
|
8
|
+
constructor(dbName: string, storeName: string);
|
|
9
|
+
save(data: Devices | DevicesChanged | ProctoringSession): Promise<void>;
|
|
8
10
|
delete(id: string): Promise<void>;
|
|
9
11
|
get(id: string): Promise<ProctoringSession | undefined>;
|
|
10
|
-
|
|
12
|
+
getDevices(id: string): Promise<Devices | undefined>;
|
|
13
|
+
list(): Promise<ProctoringSession[] | Devices[]>;
|
|
11
14
|
clear(): Promise<void>;
|
|
12
15
|
private processRequest;
|
|
13
16
|
hasSessions(): Promise<boolean>;
|
package/package.json
CHANGED
package/plugins/insights.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
|
|
2
|
+
import { DevicesChanged } from '../interfaces/Devices';
|
|
3
|
+
import { ServiceType } from '../proctoring/proctoring';
|
|
2
4
|
declare const init: (key: string) => ApplicationInsights;
|
|
3
5
|
declare const trackers: {
|
|
4
6
|
trackPage: (name: string, uri: string, properties?: {
|
|
@@ -8,6 +10,7 @@ declare const trackers: {
|
|
|
8
10
|
registerStart: (proctoringId: string, success: boolean, description: string) => void;
|
|
9
11
|
registerFinish: (proctoringId: string, success: boolean, description: string) => void;
|
|
10
12
|
registerError: (proctoringId: string, description: string) => void;
|
|
11
|
-
registerUploadVideo: (proctoringId: string, success: boolean, description: string, uploadTime?: number) => void;
|
|
13
|
+
registerUploadVideo: (proctoringId: string, success: boolean, description: string, serviceType: ServiceType, uploadTime?: number) => void;
|
|
14
|
+
registerChangeDevice: (proctoringId: string, inOrOut: string, devicesChanged: DevicesChanged) => void;
|
|
12
15
|
};
|
|
13
16
|
export { trackers, init };
|
|
@@ -5,7 +5,11 @@ export declare class DeviceChecker {
|
|
|
5
5
|
private cameraRecorder;
|
|
6
6
|
private screenRecorder;
|
|
7
7
|
constructor();
|
|
8
|
-
checkDevices(options: ProctoringSessionOptions | undefined, _videoOptions: Partial<ProctoringVideoOptions>): Promise<
|
|
8
|
+
checkDevices(options: ProctoringSessionOptions | undefined, _videoOptions: Partial<ProctoringVideoOptions>): Promise<void>;
|
|
9
|
+
private checkDevicesInterface;
|
|
10
|
+
private videoDeviceInterface;
|
|
11
|
+
private audioDeviceInterface;
|
|
12
|
+
startCheckDevices(options: ProctoringSessionOptions | undefined, _videoOptions: Partial<ProctoringVideoOptions>): Promise<{
|
|
9
13
|
cameraStream: MediaStream;
|
|
10
14
|
_screenStream: MediaStream | undefined;
|
|
11
15
|
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import StartProctoringResponse from "../dtos/StartProctoringResponse";
|
|
2
|
+
import { DevicesChanged } from "../interfaces/Devices";
|
|
2
3
|
import { ProctoringSessionOptions } from "./options/ProctoringOptions";
|
|
3
4
|
import { ProctoringVideoOptions } from "./options/ProctoringVideoOptions";
|
|
4
5
|
export interface ProctoringContext {
|
|
@@ -10,6 +11,9 @@ export interface ProctoringContext {
|
|
|
10
11
|
export interface ProctoringFinisherOptions {
|
|
11
12
|
onProgress?: (percentage: number) => void;
|
|
12
13
|
}
|
|
14
|
+
export interface ProctoringChangeDevicesOptions {
|
|
15
|
+
status?: (devices: DevicesChanged) => void;
|
|
16
|
+
}
|
|
13
17
|
export declare enum ProctoringState {
|
|
14
18
|
Stop = "Stop",
|
|
15
19
|
Starting = "Starting",
|
|
@@ -17,16 +21,23 @@ export declare enum ProctoringState {
|
|
|
17
21
|
Stopping = "Stopping",
|
|
18
22
|
Paused = "Paused"
|
|
19
23
|
}
|
|
24
|
+
export declare enum ServiceType {
|
|
25
|
+
Download = "Download",
|
|
26
|
+
Upload = "Upload"
|
|
27
|
+
}
|
|
20
28
|
export declare class Proctoring {
|
|
21
29
|
private readonly context;
|
|
22
30
|
private readonly backend;
|
|
23
31
|
private readonly repository;
|
|
32
|
+
private readonly repositoryDevices;
|
|
33
|
+
private extension;
|
|
24
34
|
private proctoringId;
|
|
25
35
|
private insights?;
|
|
26
36
|
private proctoringSession;
|
|
27
37
|
private sessionOptions;
|
|
28
38
|
private videoOptions;
|
|
29
39
|
private state;
|
|
40
|
+
private serviceType;
|
|
30
41
|
private recorder;
|
|
31
42
|
private onStopSharingScreenCallback;
|
|
32
43
|
setOnStopSharingScreenCallback(cb: () => void): void;
|
|
@@ -34,8 +45,7 @@ export declare class Proctoring {
|
|
|
34
45
|
setOnLostFocusCallback(cb: () => void): void;
|
|
35
46
|
private onFocusCallback;
|
|
36
47
|
setOnFocusCallback(cb: () => void): void;
|
|
37
|
-
|
|
38
|
-
setOnProgress(cb: (percentage: number) => void): void;
|
|
48
|
+
onChangeDevices(options?: ProctoringChangeDevicesOptions): Promise<void>;
|
|
39
49
|
constructor(context: ProctoringContext);
|
|
40
50
|
private createRecorders;
|
|
41
51
|
start(options?: ProctoringSessionOptions, _videoOptions?: Partial<ProctoringVideoOptions>): Promise<StartProctoringResponse>;
|
|
@@ -9,11 +9,8 @@ export declare function useProctoring(proctoringOptions: {
|
|
|
9
9
|
finish: (options?: import("./proctoring").ProctoringFinisherOptions) => Promise<void>;
|
|
10
10
|
onFocus: (cb: () => void) => void;
|
|
11
11
|
onLostFocus: (cb: () => void) => void;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_screenStream: MediaStream | undefined;
|
|
15
|
-
}>;
|
|
16
|
-
closeCheckDevices: () => Promise<void>;
|
|
12
|
+
onChangeDevices: (options?: import("./proctoring").ProctoringChangeDevicesOptions) => Promise<void>;
|
|
13
|
+
checkDevices: (options: import("./options/ProctoringOptions").ProctoringSessionOptions | undefined, _videoOptions: Partial<import("./options/ProctoringVideoOptions").ProctoringVideoOptions>) => Promise<void>;
|
|
17
14
|
pause: () => Promise<void>;
|
|
18
15
|
resume: (options: import("./options/ProctoringOptions").ProctoringSessionOptions | undefined, examId: string, _videoOptions?: {
|
|
19
16
|
width?: number | undefined;
|