easyproctor 1.0.8 → 1.0.9

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
@@ -219,9 +219,9 @@ const {
219
219
  });
220
220
  ```
221
221
 
222
- ## Release Note V 1.0.8
222
+ ## Release Note V 1.0.9
223
223
 
224
- - Atualização para middag
224
+ - useProctoring default as prod
225
225
 
226
226
  ## License
227
227
 
package/esm/index.js CHANGED
@@ -25729,7 +25729,7 @@ Upload Services: ${uploaderServices}`, this.serviceType);
25729
25729
  };
25730
25730
 
25731
25731
  // src/proctoring/useProctoring.ts
25732
- function useProctoring(proctoringOptions, enviromentConfig = "homol") {
25732
+ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
25733
25733
  const proctoring = new Proctoring({
25734
25734
  type: enviromentConfig,
25735
25735
  clientId: proctoringOptions.clientId,
package/index.js CHANGED
@@ -37263,7 +37263,7 @@ Upload Services: ${uploaderServices}`, this.serviceType);
37263
37263
  };
37264
37264
 
37265
37265
  // src/proctoring/useProctoring.ts
37266
- function useProctoring(proctoringOptions, enviromentConfig = "homol") {
37266
+ function useProctoring(proctoringOptions, enviromentConfig = "prod") {
37267
37267
  const proctoring = new Proctoring({
37268
37268
  type: enviromentConfig,
37269
37269
  clientId: proctoringOptions.clientId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",
@@ -37,7 +37,7 @@ Upload Services: ${n}`,this.serviceType),b1()!=="1.0.0.0"&&(r=new Va(this.procto
37
37
  Upload Services: ${n}
38
38
  Upload backup for Safe Browser`,this.serviceType)}))}),Yt.registerUpload(this.proctoringSession.id,!0,`upload success
39
39
 
40
- Upload Services: ${n}`,this.serviceType)),await this.backend.saveScreenAlerts(this.context,this.proctoringSession).catch(a=>{Yt.registerFinish(this.proctoringSession.id,!1,"save-screen error: "+a)}),await this.backend.finishAndSendUrls(this.context,this.proctoringSession).then(()=>{Yt.registerFinish(this.proctoringSession.id,!0,"")}).catch(a=>{Yt.registerFinish(this.proctoringSession.id,!1,"finish error: "+a)}),this.state="Stop"}async verifyMultipleMonitors(e){if(!e.allowMultipleMonitors&&await Wo())throw Yt.registerError(this.proctoringId,"Multiplas telas detectadas!"),Qo}async initConfig(){try{this.insights=await this.backend.getInsights(this.context),this.insights&&Qu(this.insights)}catch(e){throw Yt.registerError(this.proctoringId,"Erro no initConfig!"),await this.cancel(),e}}async getServerDate(){let e=await this.backend.getServerHour(this.context.token).catch(n=>{Yt.registerError(this.proctoringId,"N\xE3o foi poss\xEDvel requisitar a data do servidor!")});return e?new Date(e.toString()):new Date}async pause(){if(this.state!=="Recording")throw Yt.registerError(this.proctoringId,"Proctoring n\xE3o iniciado!"),Jo;await this.recorder.stopAll(),await this.recorder.saveAllOnSession(),await this.repository.save(this.proctoringSession),this.state="Paused"}async resume(){if(this.state!="Paused")throw Jo;return await this.verifyMultipleMonitors(this.sessionOptions),this.allRecorders=this.createRecorders(this.sessionOptions),await this.recorder.startAll(),this.proctoringSession.recordings=[],await this.repository.save(this.proctoringSession),this.state="Recording",{cameraStream:this.allRecorders.cameraRecorder.cameraStream,_screenStream:this.allRecorders.screenRecorder?.screenStream}}};function g1(t,e="homol"){let r=new n0({type:e,clientId:t.clientId,examId:t.examId,token:t.token}),n=new Zo,i=r.start.bind(r),a=r.finish.bind(r),s=r.pause.bind(r),v=r.resume.bind(r),d=r.setOnFocusCallback.bind(r),p=r.setOnLostFocusCallback.bind(r),B=r.setOnNoiseDetectedCallback.bind(r),G=r.onChangeDevices.bind(r),te=r.setOnStopSharingScreenCallback.bind(r),re=n.checkDevices.bind(n);return{start:i,finish:a,onFocus:d,onLostFocus:p,onNoiseDetected:B,onChangeDevices:G,checkDevices:re,pause:s,resume:v,enumarateDevices:Gn,checkPermissions:Ko,checkIfhasMultipleMonitors:Wo,onStopSharingScreen:te}}typeof window<"u"&&(window.useProctoring=g1);})();
40
+ Upload Services: ${n}`,this.serviceType)),await this.backend.saveScreenAlerts(this.context,this.proctoringSession).catch(a=>{Yt.registerFinish(this.proctoringSession.id,!1,"save-screen error: "+a)}),await this.backend.finishAndSendUrls(this.context,this.proctoringSession).then(()=>{Yt.registerFinish(this.proctoringSession.id,!0,"")}).catch(a=>{Yt.registerFinish(this.proctoringSession.id,!1,"finish error: "+a)}),this.state="Stop"}async verifyMultipleMonitors(e){if(!e.allowMultipleMonitors&&await Wo())throw Yt.registerError(this.proctoringId,"Multiplas telas detectadas!"),Qo}async initConfig(){try{this.insights=await this.backend.getInsights(this.context),this.insights&&Qu(this.insights)}catch(e){throw Yt.registerError(this.proctoringId,"Erro no initConfig!"),await this.cancel(),e}}async getServerDate(){let e=await this.backend.getServerHour(this.context.token).catch(n=>{Yt.registerError(this.proctoringId,"N\xE3o foi poss\xEDvel requisitar a data do servidor!")});return e?new Date(e.toString()):new Date}async pause(){if(this.state!=="Recording")throw Yt.registerError(this.proctoringId,"Proctoring n\xE3o iniciado!"),Jo;await this.recorder.stopAll(),await this.recorder.saveAllOnSession(),await this.repository.save(this.proctoringSession),this.state="Paused"}async resume(){if(this.state!="Paused")throw Jo;return await this.verifyMultipleMonitors(this.sessionOptions),this.allRecorders=this.createRecorders(this.sessionOptions),await this.recorder.startAll(),this.proctoringSession.recordings=[],await this.repository.save(this.proctoringSession),this.state="Recording",{cameraStream:this.allRecorders.cameraRecorder.cameraStream,_screenStream:this.allRecorders.screenRecorder?.screenStream}}};function g1(t,e="prod"){let r=new n0({type:e,clientId:t.clientId,examId:t.examId,token:t.token}),n=new Zo,i=r.start.bind(r),a=r.finish.bind(r),s=r.pause.bind(r),v=r.resume.bind(r),d=r.setOnFocusCallback.bind(r),p=r.setOnLostFocusCallback.bind(r),B=r.setOnNoiseDetectedCallback.bind(r),G=r.onChangeDevices.bind(r),te=r.setOnStopSharingScreenCallback.bind(r),re=n.checkDevices.bind(n);return{start:i,finish:a,onFocus:d,onLostFocus:p,onNoiseDetected:B,onChangeDevices:G,checkDevices:re,pause:s,resume:v,enumarateDevices:Gn,checkPermissions:Ko,checkIfhasMultipleMonitors:Wo,onStopSharingScreen:te}}typeof window<"u"&&(window.useProctoring=g1);})();
41
41
  /*!
42
42
  * Microsoft Dynamic Proto Utility, 1.1.4
43
43
  * Copyright (c) Microsoft and contributors. All rights reserved.