easyproctor 2.0.0 → 2.0.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.
package/README.md CHANGED
@@ -264,6 +264,10 @@ const {
264
264
  });
265
265
  ```
266
266
 
267
+ ## Release Note V 2.0.1
268
+ - Tratamento para duplo clique no checkDevices
269
+ - Ajuste de CORS no NoiseRecorder
270
+
267
271
  ## Release Note V 2.0.0
268
272
  - Remoção do script deprecated AudioProcessor
269
273
  - Monitoramento ativo durante o exame
@@ -280,7 +284,7 @@ const {
280
284
 
281
285
  ```ts
282
286
  {
283
- allowedPositionFace: boolean,
287
+ allowedAmbient: boolean,
284
288
  allowedMicrophone: boolean,
285
289
  allowedPositionFace: boolean,
286
290
  allowedResolution: boolean,
package/esm/index.js CHANGED
@@ -7804,7 +7804,7 @@ var BackendService = class {
7804
7804
  };
7805
7805
 
7806
7806
  // src/proctoring/DeviceChecker.ts
7807
- var DeviceChecker = class {
7807
+ var _DeviceChecker = class {
7808
7808
  constructor(context) {
7809
7809
  this.videoOptions = { width: 1080, height: 720, minWidth: 0, minHeight: 0 };
7810
7810
  this.volumeMedia = 0;
@@ -7825,6 +7825,10 @@ var DeviceChecker = class {
7825
7825
  }
7826
7826
  async checkDevices(options = getDefaultProctoringOptions, _videoOptions) {
7827
7827
  var _a2;
7828
+ if (_DeviceChecker.isModalOpen) {
7829
+ return Promise.reject();
7830
+ }
7831
+ _DeviceChecker.isModalOpen = true;
7828
7832
  try {
7829
7833
  this.options = {
7830
7834
  ...getDefaultProctoringOptions,
@@ -8592,6 +8596,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
8592
8596
  }
8593
8597
  async closeCheckDevices() {
8594
8598
  var _a2;
8599
+ _DeviceChecker.isModalOpen = false;
8595
8600
  const checkDevices = document.querySelector("#checkDevices");
8596
8601
  checkDevices == null ? void 0 : checkDevices.remove();
8597
8602
  this.faceDetection.stopDetection();
@@ -8605,6 +8610,8 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
8605
8610
  }
8606
8611
  }
8607
8612
  };
8613
+ var DeviceChecker = _DeviceChecker;
8614
+ DeviceChecker.isModalOpen = false;
8608
8615
 
8609
8616
  // src/extension/extension.ts
8610
8617
  var Extension = class {
@@ -11364,7 +11371,7 @@ var NoiseRecorder = class {
11364
11371
  async streamingAudioClassification() {
11365
11372
  this.context = new AudioContext({ sampleRate: 16e3 });
11366
11373
  try {
11367
- await this.context.audioWorklet.addModule("./src/new-flow/recorders/audio-processor.js");
11374
+ await this.context.audioWorklet.addModule("https://easyproctor-public.s3.us-east-2.amazonaws.com/utils/audio-processor.js");
11368
11375
  } catch (error) {
11369
11376
  throw new Error("\u274C Error loading audio worklet module");
11370
11377
  }
package/index.js CHANGED
@@ -19335,7 +19335,7 @@ var BackendService = class {
19335
19335
  };
19336
19336
 
19337
19337
  // src/proctoring/DeviceChecker.ts
19338
- var DeviceChecker = class {
19338
+ var _DeviceChecker = class {
19339
19339
  constructor(context) {
19340
19340
  this.videoOptions = { width: 1080, height: 720, minWidth: 0, minHeight: 0 };
19341
19341
  this.volumeMedia = 0;
@@ -19356,6 +19356,10 @@ var DeviceChecker = class {
19356
19356
  }
19357
19357
  async checkDevices(options = getDefaultProctoringOptions, _videoOptions) {
19358
19358
  var _a2;
19359
+ if (_DeviceChecker.isModalOpen) {
19360
+ return Promise.reject();
19361
+ }
19362
+ _DeviceChecker.isModalOpen = true;
19359
19363
  try {
19360
19364
  this.options = {
19361
19365
  ...getDefaultProctoringOptions,
@@ -20123,6 +20127,7 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
20123
20127
  }
20124
20128
  async closeCheckDevices() {
20125
20129
  var _a2;
20130
+ _DeviceChecker.isModalOpen = false;
20126
20131
  const checkDevices = document.querySelector("#checkDevices");
20127
20132
  checkDevices == null ? void 0 : checkDevices.remove();
20128
20133
  this.faceDetection.stopDetection();
@@ -20136,6 +20141,8 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
20136
20141
  }
20137
20142
  }
20138
20143
  };
20144
+ var DeviceChecker = _DeviceChecker;
20145
+ DeviceChecker.isModalOpen = false;
20139
20146
 
20140
20147
  // src/extension/extension.ts
20141
20148
  var Extension = class {
@@ -22895,7 +22902,7 @@ var NoiseRecorder = class {
22895
22902
  async streamingAudioClassification() {
22896
22903
  this.context = new AudioContext({ sampleRate: 16e3 });
22897
22904
  try {
22898
- await this.context.audioWorklet.addModule("./src/new-flow/recorders/audio-processor.js");
22905
+ await this.context.audioWorklet.addModule("https://easyproctor-public.s3.us-east-2.amazonaws.com/utils/audio-processor.js");
22899
22906
  } catch (error) {
22900
22907
  throw new Error("\u274C Error loading audio worklet module");
22901
22908
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",
@@ -21,6 +21,7 @@ export interface checkDevicesReturn {
21
21
  };
22
22
  }
23
23
  export declare class DeviceChecker {
24
+ private static isModalOpen;
24
25
  private options;
25
26
  private videoOptions;
26
27
  private cameraRecorder;