easyproctor 2.1.0 → 2.1.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
@@ -263,6 +263,10 @@ const {
263
263
  token: "...",
264
264
  });
265
265
  ```
266
+ ## Release Note V 2.1.1
267
+ - Escolha automatica do codec suportado (vp8/vp9)
268
+ - Não é mais obrigatório passar width e height no check devices
269
+ - Melhorias nos logs
266
270
 
267
271
  ## Release Note V 2.1.0
268
272
  - Criação do runCheckDevicesFlow que permite que o usuário receba a lógica do checkDevices() em um modal próprio
package/esm/index.js CHANGED
@@ -4537,6 +4537,12 @@ function validatePartialVideoOptions(options) {
4537
4537
  return { width: 640, height: 480 };
4538
4538
  }
4539
4539
  }
4540
+ var getDefaultProctoringVideoOptions = {
4541
+ width: 1280,
4542
+ height: 720,
4543
+ minWidth: 640,
4544
+ minHeight: 480
4545
+ };
4540
4546
 
4541
4547
  // node_modules/axios/lib/helpers/bind.js
4542
4548
  function bind(fn3, thisArg) {
@@ -6818,9 +6824,11 @@ var eventNames = {
6818
6824
  FINISH: "finish",
6819
6825
  ERROR: "error",
6820
6826
  UPLOAD_VIDEO: "upload_video",
6827
+ DOWNLOAD_VIDEO: "download_video",
6821
6828
  BUFFER_SIZE: "buffer_size",
6822
6829
  ANOTHER_STREAM: "another_stream",
6823
- BROWSER_NOT_SUPPORTED: "browser_not_supported"
6830
+ BROWSER_NOT_SUPPORTED: "browser_not_supported",
6831
+ SAVE_ON_SESSION: "save_on_session"
6824
6832
  };
6825
6833
  var log = (eventName, properties) => backendService && backendService.log(eventName, properties);
6826
6834
  var trackers = {
@@ -6833,8 +6841,10 @@ var trackers = {
6833
6841
  registerChangeDevice: (proctoringId, inOrOut, devicesChanged) => log(eventNames.UPLOAD_VIDEO, { proctoringId, inOrOut, devicesChanged }),
6834
6842
  registerStopSharingScreen: (proctoringId, description) => log(eventNames.UPLOAD_VIDEO, { proctoringId, description }),
6835
6843
  registerErrorRecorderRTC: (proctoringId, description) => log(eventNames.UPLOAD_VIDEO, { proctoringId, description }),
6844
+ registerDownloadFile: (proctoringId, description) => log(eventNames.DOWNLOAD_VIDEO, { proctoringId, description }),
6836
6845
  registerOnBufferSizeError: (proctoringId, description) => log(eventNames.BUFFER_SIZE, { proctoringId, description }),
6837
- registerAnotherStream: (proctoringId, description) => log(eventNames.ANOTHER_STREAM, { proctoringId, description })
6846
+ registerAnotherStream: (proctoringId, description) => log(eventNames.ANOTHER_STREAM, { proctoringId, description }),
6847
+ registerSaveOnSession: (proctoringId, description) => log(eventNames.SAVE_ON_SESSION, { proctoringId, description })
6838
6848
  };
6839
6849
 
6840
6850
  // src/plugins/recorder.ts
@@ -6843,11 +6853,18 @@ function recorder(stream, buffer, proctoringId, onBufferSizeError = false, onBuf
6843
6853
  let stopped = false;
6844
6854
  let onBufferSizeInterval;
6845
6855
  let lastEvent;
6856
+ let bufferSize;
6857
+ bufferSize = 0;
6846
6858
  let options = {
6847
6859
  mimeType: "video/webm",
6848
6860
  videoBitsPerSecond: 128e3,
6849
6861
  audioBitsPerSecond: 64 * 1e3
6850
6862
  };
6863
+ if (MediaRecorder.isTypeSupported("video/webm;codecs=vp9")) {
6864
+ options.mimeType = "video/webm;codecs=vp9";
6865
+ } else {
6866
+ console.warn("vp9 codec not supported. Using default mimeType without vp9.");
6867
+ }
6851
6868
  if (audio) {
6852
6869
  options = {
6853
6870
  mimeType: "audio/webm",
@@ -6856,6 +6873,7 @@ function recorder(stream, buffer, proctoringId, onBufferSizeError = false, onBuf
6856
6873
  }
6857
6874
  const mediaRecorder = new MediaRecorder(stream, options);
6858
6875
  mediaRecorder.ondataavailable = (e3) => {
6876
+ bufferSize = bufferSize + e3.data.size;
6859
6877
  if (e3.data.size > 0) {
6860
6878
  buffer.push(e3.data);
6861
6879
  }
@@ -6878,6 +6896,7 @@ function recorder(stream, buffer, proctoringId, onBufferSizeError = false, onBuf
6878
6896
  return new Promise((resolve) => {
6879
6897
  resolvePromise = resolve;
6880
6898
  mediaRecorder.start();
6899
+ bufferSize = 0;
6881
6900
  stopped = false;
6882
6901
  if (onBufferSizeError) {
6883
6902
  onBufferSizeInterval = setInterval(async () => {
@@ -6921,7 +6940,10 @@ function recorder(stream, buffer, proctoringId, onBufferSizeError = false, onBuf
6921
6940
  }
6922
6941
  });
6923
6942
  }
6924
- return { startRecording, stopRecording, pauseRecording, resumeRecording };
6943
+ function getBufferSize() {
6944
+ return bufferSize;
6945
+ }
6946
+ return { startRecording, stopRecording, pauseRecording, resumeRecording, options, getBufferSize };
6925
6947
  }
6926
6948
 
6927
6949
  // src/new-flow/upload/UploadService.ts
@@ -7301,11 +7323,13 @@ var CameraRecorder = class {
7301
7323
  throw "N\xE3o foi poss\xEDvel conectar a camera, ela pode estar sendo utilizada por outro programa";
7302
7324
  throw error;
7303
7325
  }
7304
- const { startRecording, stopRecording, pauseRecording, resumeRecording } = recorder(this.cameraStream, this.blobs, this.proctoringId, this.options.onBufferSizeError, onBufferSizeErrorCallback);
7326
+ const { startRecording, stopRecording, pauseRecording, resumeRecording, options, getBufferSize } = recorder(this.cameraStream, this.blobs, this.proctoringId, this.options.onBufferSizeError, onBufferSizeErrorCallback);
7305
7327
  this.recordingStart = startRecording;
7306
7328
  this.recordingStop = stopRecording;
7307
7329
  this.recordingPause = pauseRecording;
7308
7330
  this.recordingResume = resumeRecording;
7331
+ this.recorderOptions = options;
7332
+ this.getBufferSize = getBufferSize;
7309
7333
  this.recordingStart();
7310
7334
  const tracks = this.cameraStream.getVideoTracks();
7311
7335
  const settings = tracks[0].getSettings();
@@ -7313,8 +7337,8 @@ var CameraRecorder = class {
7313
7337
  throw STREAM_UNDER_MINIMUM_PERMITTED;
7314
7338
  } else if (this.videoOptions.width !== settings.width || this.videoOptions.height !== settings.height) {
7315
7339
  trackers.registerAnotherStream(this.proctoringId, `Maybe have another stream active
7316
- Video Options: ${this.videoOptions}
7317
- Setting: ${settings}`);
7340
+ Video Options: ${JSON.stringify(this.videoOptions, null, 2)}
7341
+ Setting: ${JSON.stringify(settings, null, 2)}`);
7318
7342
  throw ANOTHER_STREAM_ACTIVE;
7319
7343
  }
7320
7344
  ((_d = this.paramsConfig.imageBehaviourParameters) == null ? void 0 : _d.useUploadImage) && this.options.proctoringType == "IMAGE" && this.photoShotsCycle();
@@ -7459,16 +7483,21 @@ Setting: ${settings}`);
7459
7483
  window.URL.revokeObjectURL(url);
7460
7484
  }
7461
7485
  async saveOnSession(session) {
7462
- var _a2;
7486
+ var _a2, _b;
7487
+ if (this.blobs != null)
7488
+ trackers.registerSaveOnSession(this.proctoringId, `Blobs Length: ${this.blobs.length} Buffer Size: ${this.getBufferSize()} `);
7463
7489
  const settings = this.cameraStream.getVideoTracks()[0].getSettings();
7464
7490
  const settingsAudio = this.cameraStream.getAudioTracks()[0].getSettings();
7465
7491
  if (this.options.proctoringType == "VIDEO" || this.options.proctoringType == "REALTIME" || this.options.proctoringType == "IMAGE" && ((_a2 = this.paramsConfig.imageBehaviourParameters) == null ? void 0 : _a2.saveVideo)) {
7466
7492
  session.addRecording({
7467
7493
  device: `Audio
7468
7494
  Sample Rate: ${settingsAudio.sampleRate}
7469
- Sample Size: ${settingsAudio.sampleSize}`,
7495
+ Sample Size: ${settingsAudio.sampleSize}
7496
+
7497
+ Video:
7498
+ ${JSON.stringify(this.recorderOptions)}`,
7470
7499
  file: new File(this.blobs, `EP_${session.id}_camera_0.webm`, {
7471
- type: "video/webm"
7500
+ type: ((_b = this.recorderOptions) == null ? void 0 : _b.mimeType) || "video/webm"
7472
7501
  }),
7473
7502
  origin: "Camera" /* Camera */
7474
7503
  });
@@ -8286,7 +8315,7 @@ var _DeviceCheckerService = class {
8286
8315
  });
8287
8316
  }
8288
8317
  }
8289
- async checkDevices(options = getDefaultProctoringOptions, _videoOptions) {
8318
+ async checkDevices(options = getDefaultProctoringOptions, _videoOptions = getDefaultProctoringVideoOptions) {
8290
8319
  var _a2;
8291
8320
  if (_DeviceCheckerService.isModalOpen) {
8292
8321
  return Promise.reject();
@@ -8858,13 +8887,21 @@ var DownloadService = class {
8858
8887
  this.proctoringId = proctoringId;
8859
8888
  }
8860
8889
  async upload(data, token) {
8890
+ const { file, onProgress } = data;
8861
8891
  try {
8862
- const { file, onProgress } = data;
8892
+ trackers.registerDownloadFile(this.proctoringId, `File to download
8893
+ File name: ${file.name}
8894
+ File type: ${file.type}
8895
+ File size: ${file.size}}`);
8863
8896
  (0, import_file_saver.saveAs)(file);
8864
8897
  this.loadingBoolean = false;
8865
8898
  clearInterval(this.loadingInterval);
8866
8899
  onProgress && onProgress(Math.round(100));
8867
8900
  } catch (err) {
8901
+ file && this.proctoringId && trackers.registerError(this.proctoringId, `Failed on machine download
8902
+ File name: ${file.name}
8903
+ File type: ${file.type}
8904
+ File size: ${file.size}`);
8868
8905
  throw new Error(`Error on machine download`);
8869
8906
  }
8870
8907
  }
@@ -12162,13 +12199,15 @@ Upload Services: ${uploaderServices}`,
12162
12199
  this.serviceType
12163
12200
  );
12164
12201
  }
12165
- await this.backend.saveScreenAlerts(this.context, this.proctoringSession).catch((err) => {
12166
- trackers.registerFinish(
12167
- this.proctoringSession.id,
12168
- false,
12169
- "save-screen error: " + err
12170
- );
12171
- });
12202
+ if (this.proctoringSession.alerts.length > 0) {
12203
+ await this.backend.saveScreenAlerts(this.context, this.proctoringSession).catch((err) => {
12204
+ trackers.registerFinish(
12205
+ this.proctoringSession.id,
12206
+ false,
12207
+ "save-screen error: " + err
12208
+ );
12209
+ });
12210
+ }
12172
12211
  await this.backend.finishAndSendUrls(this.context, this.proctoringSession).then(() => {
12173
12212
  trackers.registerFinish(this.proctoringSession.id, true, "");
12174
12213
  }).catch((error) => {
package/index.js CHANGED
@@ -15240,6 +15240,12 @@ function validatePartialVideoOptions(options) {
15240
15240
  return { width: 640, height: 480 };
15241
15241
  }
15242
15242
  }
15243
+ var getDefaultProctoringVideoOptions = {
15244
+ width: 1280,
15245
+ height: 720,
15246
+ minWidth: 640,
15247
+ minHeight: 480
15248
+ };
15243
15249
 
15244
15250
  // node_modules/axios/lib/helpers/bind.js
15245
15251
  function bind(fn3, thisArg) {
@@ -18349,9 +18355,11 @@ var eventNames = {
18349
18355
  FINISH: "finish",
18350
18356
  ERROR: "error",
18351
18357
  UPLOAD_VIDEO: "upload_video",
18358
+ DOWNLOAD_VIDEO: "download_video",
18352
18359
  BUFFER_SIZE: "buffer_size",
18353
18360
  ANOTHER_STREAM: "another_stream",
18354
- BROWSER_NOT_SUPPORTED: "browser_not_supported"
18361
+ BROWSER_NOT_SUPPORTED: "browser_not_supported",
18362
+ SAVE_ON_SESSION: "save_on_session"
18355
18363
  };
18356
18364
  var log = (eventName, properties) => backendService && backendService.log(eventName, properties);
18357
18365
  var trackers = {
@@ -18364,8 +18372,10 @@ var trackers = {
18364
18372
  registerChangeDevice: (proctoringId, inOrOut, devicesChanged) => log(eventNames.UPLOAD_VIDEO, { proctoringId, inOrOut, devicesChanged }),
18365
18373
  registerStopSharingScreen: (proctoringId, description) => log(eventNames.UPLOAD_VIDEO, { proctoringId, description }),
18366
18374
  registerErrorRecorderRTC: (proctoringId, description) => log(eventNames.UPLOAD_VIDEO, { proctoringId, description }),
18375
+ registerDownloadFile: (proctoringId, description) => log(eventNames.DOWNLOAD_VIDEO, { proctoringId, description }),
18367
18376
  registerOnBufferSizeError: (proctoringId, description) => log(eventNames.BUFFER_SIZE, { proctoringId, description }),
18368
- registerAnotherStream: (proctoringId, description) => log(eventNames.ANOTHER_STREAM, { proctoringId, description })
18377
+ registerAnotherStream: (proctoringId, description) => log(eventNames.ANOTHER_STREAM, { proctoringId, description }),
18378
+ registerSaveOnSession: (proctoringId, description) => log(eventNames.SAVE_ON_SESSION, { proctoringId, description })
18369
18379
  };
18370
18380
 
18371
18381
  // src/plugins/recorder.ts
@@ -18374,11 +18384,18 @@ function recorder(stream4, buffer, proctoringId, onBufferSizeError = false, onBu
18374
18384
  let stopped = false;
18375
18385
  let onBufferSizeInterval;
18376
18386
  let lastEvent;
18387
+ let bufferSize;
18388
+ bufferSize = 0;
18377
18389
  let options = {
18378
18390
  mimeType: "video/webm",
18379
18391
  videoBitsPerSecond: 128e3,
18380
18392
  audioBitsPerSecond: 64 * 1e3
18381
18393
  };
18394
+ if (MediaRecorder.isTypeSupported("video/webm;codecs=vp9")) {
18395
+ options.mimeType = "video/webm;codecs=vp9";
18396
+ } else {
18397
+ console.warn("vp9 codec not supported. Using default mimeType without vp9.");
18398
+ }
18382
18399
  if (audio) {
18383
18400
  options = {
18384
18401
  mimeType: "audio/webm",
@@ -18387,6 +18404,7 @@ function recorder(stream4, buffer, proctoringId, onBufferSizeError = false, onBu
18387
18404
  }
18388
18405
  const mediaRecorder = new MediaRecorder(stream4, options);
18389
18406
  mediaRecorder.ondataavailable = (e3) => {
18407
+ bufferSize = bufferSize + e3.data.size;
18390
18408
  if (e3.data.size > 0) {
18391
18409
  buffer.push(e3.data);
18392
18410
  }
@@ -18409,6 +18427,7 @@ function recorder(stream4, buffer, proctoringId, onBufferSizeError = false, onBu
18409
18427
  return new Promise((resolve) => {
18410
18428
  resolvePromise = resolve;
18411
18429
  mediaRecorder.start();
18430
+ bufferSize = 0;
18412
18431
  stopped = false;
18413
18432
  if (onBufferSizeError) {
18414
18433
  onBufferSizeInterval = setInterval(async () => {
@@ -18452,7 +18471,10 @@ function recorder(stream4, buffer, proctoringId, onBufferSizeError = false, onBu
18452
18471
  }
18453
18472
  });
18454
18473
  }
18455
- return { startRecording, stopRecording, pauseRecording, resumeRecording };
18474
+ function getBufferSize() {
18475
+ return bufferSize;
18476
+ }
18477
+ return { startRecording, stopRecording, pauseRecording, resumeRecording, options, getBufferSize };
18456
18478
  }
18457
18479
 
18458
18480
  // src/new-flow/upload/UploadService.ts
@@ -18832,11 +18854,13 @@ var CameraRecorder = class {
18832
18854
  throw "N\xE3o foi poss\xEDvel conectar a camera, ela pode estar sendo utilizada por outro programa";
18833
18855
  throw error;
18834
18856
  }
18835
- const { startRecording, stopRecording, pauseRecording, resumeRecording } = recorder(this.cameraStream, this.blobs, this.proctoringId, this.options.onBufferSizeError, onBufferSizeErrorCallback);
18857
+ const { startRecording, stopRecording, pauseRecording, resumeRecording, options, getBufferSize } = recorder(this.cameraStream, this.blobs, this.proctoringId, this.options.onBufferSizeError, onBufferSizeErrorCallback);
18836
18858
  this.recordingStart = startRecording;
18837
18859
  this.recordingStop = stopRecording;
18838
18860
  this.recordingPause = pauseRecording;
18839
18861
  this.recordingResume = resumeRecording;
18862
+ this.recorderOptions = options;
18863
+ this.getBufferSize = getBufferSize;
18840
18864
  this.recordingStart();
18841
18865
  const tracks = this.cameraStream.getVideoTracks();
18842
18866
  const settings = tracks[0].getSettings();
@@ -18844,8 +18868,8 @@ var CameraRecorder = class {
18844
18868
  throw STREAM_UNDER_MINIMUM_PERMITTED;
18845
18869
  } else if (this.videoOptions.width !== settings.width || this.videoOptions.height !== settings.height) {
18846
18870
  trackers.registerAnotherStream(this.proctoringId, `Maybe have another stream active
18847
- Video Options: ${this.videoOptions}
18848
- Setting: ${settings}`);
18871
+ Video Options: ${JSON.stringify(this.videoOptions, null, 2)}
18872
+ Setting: ${JSON.stringify(settings, null, 2)}`);
18849
18873
  throw ANOTHER_STREAM_ACTIVE;
18850
18874
  }
18851
18875
  ((_d = this.paramsConfig.imageBehaviourParameters) == null ? void 0 : _d.useUploadImage) && this.options.proctoringType == "IMAGE" && this.photoShotsCycle();
@@ -18990,16 +19014,21 @@ Setting: ${settings}`);
18990
19014
  window.URL.revokeObjectURL(url2);
18991
19015
  }
18992
19016
  async saveOnSession(session) {
18993
- var _a2;
19017
+ var _a2, _b;
19018
+ if (this.blobs != null)
19019
+ trackers.registerSaveOnSession(this.proctoringId, `Blobs Length: ${this.blobs.length} Buffer Size: ${this.getBufferSize()} `);
18994
19020
  const settings = this.cameraStream.getVideoTracks()[0].getSettings();
18995
19021
  const settingsAudio = this.cameraStream.getAudioTracks()[0].getSettings();
18996
19022
  if (this.options.proctoringType == "VIDEO" || this.options.proctoringType == "REALTIME" || this.options.proctoringType == "IMAGE" && ((_a2 = this.paramsConfig.imageBehaviourParameters) == null ? void 0 : _a2.saveVideo)) {
18997
19023
  session.addRecording({
18998
19024
  device: `Audio
18999
19025
  Sample Rate: ${settingsAudio.sampleRate}
19000
- Sample Size: ${settingsAudio.sampleSize}`,
19026
+ Sample Size: ${settingsAudio.sampleSize}
19027
+
19028
+ Video:
19029
+ ${JSON.stringify(this.recorderOptions)}`,
19001
19030
  file: new File(this.blobs, `EP_${session.id}_camera_0.webm`, {
19002
- type: "video/webm"
19031
+ type: ((_b = this.recorderOptions) == null ? void 0 : _b.mimeType) || "video/webm"
19003
19032
  }),
19004
19033
  origin: "Camera" /* Camera */
19005
19034
  });
@@ -19817,7 +19846,7 @@ var _DeviceCheckerService = class {
19817
19846
  });
19818
19847
  }
19819
19848
  }
19820
- async checkDevices(options = getDefaultProctoringOptions, _videoOptions) {
19849
+ async checkDevices(options = getDefaultProctoringOptions, _videoOptions = getDefaultProctoringVideoOptions) {
19821
19850
  var _a2;
19822
19851
  if (_DeviceCheckerService.isModalOpen) {
19823
19852
  return Promise.reject();
@@ -20389,13 +20418,21 @@ var DownloadService = class {
20389
20418
  this.proctoringId = proctoringId;
20390
20419
  }
20391
20420
  async upload(data, token) {
20421
+ const { file, onProgress } = data;
20392
20422
  try {
20393
- const { file, onProgress } = data;
20423
+ trackers.registerDownloadFile(this.proctoringId, `File to download
20424
+ File name: ${file.name}
20425
+ File type: ${file.type}
20426
+ File size: ${file.size}}`);
20394
20427
  (0, import_file_saver.saveAs)(file);
20395
20428
  this.loadingBoolean = false;
20396
20429
  clearInterval(this.loadingInterval);
20397
20430
  onProgress && onProgress(Math.round(100));
20398
20431
  } catch (err) {
20432
+ file && this.proctoringId && trackers.registerError(this.proctoringId, `Failed on machine download
20433
+ File name: ${file.name}
20434
+ File type: ${file.type}
20435
+ File size: ${file.size}`);
20399
20436
  throw new Error(`Error on machine download`);
20400
20437
  }
20401
20438
  }
@@ -23693,13 +23730,15 @@ Upload Services: ${uploaderServices}`,
23693
23730
  this.serviceType
23694
23731
  );
23695
23732
  }
23696
- await this.backend.saveScreenAlerts(this.context, this.proctoringSession).catch((err) => {
23697
- trackers.registerFinish(
23698
- this.proctoringSession.id,
23699
- false,
23700
- "save-screen error: " + err
23701
- );
23702
- });
23733
+ if (this.proctoringSession.alerts.length > 0) {
23734
+ await this.backend.saveScreenAlerts(this.context, this.proctoringSession).catch((err) => {
23735
+ trackers.registerFinish(
23736
+ this.proctoringSession.id,
23737
+ false,
23738
+ "save-screen error: " + err
23739
+ );
23740
+ });
23741
+ }
23703
23742
  await this.backend.finishAndSendUrls(this.context, this.proctoringSession).then(() => {
23704
23743
  trackers.registerFinish(this.proctoringSession.id, true, "");
23705
23744
  }).catch((error) => {
@@ -39,7 +39,7 @@ export declare class DeviceCheckerService {
39
39
  constructor(context: ProctoringContext);
40
40
  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>;
41
41
  private onUpdateCallback;
42
- checkDevices(options: ProctoringSessionOptions | undefined, _videoOptions: ProctoringVideoOptions): Promise<checkDevicesReturn>;
42
+ checkDevices(options?: ProctoringSessionOptions, _videoOptions?: ProctoringVideoOptions): Promise<checkDevicesReturn>;
43
43
  private isUnderResolution;
44
44
  private realtimeAlerts;
45
45
  private videoDeviceInterface;
@@ -23,6 +23,7 @@ export declare class CameraRecorder implements IRecorder {
23
23
  backend: BackendService | undefined;
24
24
  backendToken: string | undefined;
25
25
  proctoringId: string | undefined;
26
+ private recorderOptions;
26
27
  upload: UploadService | undefined;
27
28
  video: HTMLVideoElement;
28
29
  canvas: HTMLCanvasElement;
@@ -45,6 +46,7 @@ export declare class CameraRecorder implements IRecorder {
45
46
  recordingStop: () => any;
46
47
  recordingPause: () => any;
47
48
  recordingResume: () => any;
49
+ getBufferSize: () => any;
48
50
  setProctoringId(proctoringId: string): void;
49
51
  initializeDetectors(): Promise<void>;
50
52
  configImageCapture(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",
@@ -12,7 +12,9 @@ declare const trackers: {
12
12
  registerChangeDevice: (proctoringId: string, inOrOut: string, devicesChanged: DevicesChanged) => Promise<string>;
13
13
  registerStopSharingScreen: (proctoringId: string, description: string) => Promise<string>;
14
14
  registerErrorRecorderRTC: (proctoringId: string, description: string) => Promise<string>;
15
+ registerDownloadFile: (proctoringId: string, description: string) => Promise<string>;
15
16
  registerOnBufferSizeError: (proctoringId: string, description: string) => Promise<string>;
16
17
  registerAnotherStream: (proctoringId: string, description: string) => Promise<string>;
18
+ registerSaveOnSession: (proctoringId: string, description: string) => Promise<string>;
17
19
  };
18
20
  export { trackers, init };
@@ -3,4 +3,6 @@ export default function recorder(stream: MediaStream, buffer: Blob[], proctoring
3
3
  stopRecording: () => Promise<void>;
4
4
  pauseRecording: () => Promise<void>;
5
5
  resumeRecording: () => Promise<void>;
6
+ options: MediaRecorderOptions;
7
+ getBufferSize: () => number;
6
8
  };
@@ -5,3 +5,4 @@ export interface ProctoringVideoOptions {
5
5
  minHeight?: number;
6
6
  }
7
7
  export declare function validatePartialVideoOptions(options: Partial<ProctoringVideoOptions>): ProctoringVideoOptions;
8
+ export declare const getDefaultProctoringVideoOptions: ProctoringVideoOptions;
@@ -10,7 +10,7 @@ export declare function useProctoring(proctoringOptions: ProctoringContext, envi
10
10
  onChangeDevices: (options?: import("./proctoring").ProctoringChangeDevicesOptions) => Promise<void>;
11
11
  onBufferSizeError: (cb: () => void) => void;
12
12
  onRealtimeAlerts: (options?: import("./proctoring").ProctoringRealtimeAlertsOptions) => Promise<void>;
13
- checkDevices: (options: import("./options/ProctoringOptions").ProctoringSessionOptions | undefined, _videoOptions: import("./options/ProctoringVideoOptions").ProctoringVideoOptions) => Promise<import("../new-flow/checkers/DeviceCheckerService").checkDevicesReturn>;
13
+ checkDevices: (options?: import("./options/ProctoringOptions").ProctoringSessionOptions, _videoOptions?: import("./options/ProctoringVideoOptions").ProctoringVideoOptions) => Promise<import("../new-flow/checkers/DeviceCheckerService").checkDevicesReturn>;
14
14
  runCheckDevicesFlow: (options: import("./options/ProctoringOptions").ProctoringSessionOptions, _videoOptions: Partial<import("./options/ProctoringVideoOptions").ProctoringVideoOptions>, onModalConfirm: (resolve: (cameraId: string, microphoneId: string) => void) => void, onModalCancel: (reject: (error: Error) => void) => void, onUpdate: (feedback: any) => void) => Promise<any>;
15
15
  changeSelectedDevice: ({ cameraId, microphoneId }: any) => Promise<{
16
16
  cameraStream: MediaStream;