easyproctor-hml 2.5.8 → 2.5.10

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,9 @@ const {
264
264
  });
265
265
  ```
266
266
 
267
+ ## Release Note V 2.4.0
268
+ - Compatibilidade com dispositivos móveis implementada
269
+
267
270
  ## Release Note V 2.3.3
268
271
  - Correção do reset no startSession
269
272
 
package/esm/index.js CHANGED
@@ -9567,6 +9567,35 @@ var getDefaultProctoringVideoOptions = {
9567
9567
  minHeight: 480
9568
9568
  };
9569
9569
 
9570
+ // src/utils/browserInformations.ts
9571
+ function fnBrowserDetect() {
9572
+ const userAgent = navigator.userAgent;
9573
+ let browserName;
9574
+ if (userAgent.match(/chrome|chromium|crios/i)) {
9575
+ browserName = "chrome";
9576
+ } else if (userAgent.match(/firefox|fxios/i)) {
9577
+ browserName = "firefox";
9578
+ } else if (userAgent.match(/safari/i)) {
9579
+ browserName = "safari";
9580
+ } else if (userAgent.match(/opr\//i)) {
9581
+ browserName = "opera";
9582
+ } else if (userAgent.match(/edg/i)) {
9583
+ browserName = "edge";
9584
+ } else {
9585
+ browserName = "No browser detection";
9586
+ }
9587
+ return browserName;
9588
+ }
9589
+ function isMobileDevice() {
9590
+ if ("userAgentData" in navigator) {
9591
+ const navUAData = navigator.userAgentData;
9592
+ const mobile = navUAData.mobile || false;
9593
+ const platform = navUAData.platform || "";
9594
+ return mobile || /Android|iOS/i.test(platform);
9595
+ }
9596
+ return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
9597
+ }
9598
+
9570
9599
  // src/plugins/insights.ts
9571
9600
  var backendService;
9572
9601
  var init = (backend) => {
@@ -10116,15 +10145,6 @@ var CameraRecorder = class {
10116
10145
  this.options.onBufferSizeErrorCallback && this.options.onBufferSizeErrorCallback();
10117
10146
  }
10118
10147
  }
10119
- isMobileDevice() {
10120
- if ("userAgentData" in navigator) {
10121
- const navUAData = navigator.userAgentData;
10122
- const mobile = navUAData.mobile || false;
10123
- const platform = navUAData.platform || "";
10124
- return mobile || /Android|iOS/i.test(platform);
10125
- }
10126
- return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
10127
- }
10128
10148
  async startRecording(options) {
10129
10149
  var _a2, _b, _c2, _d, _e3, _f, _g, _h;
10130
10150
  if ((((_a2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _a2.detectPerson) || ((_b = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _b.detectCellPhone) || ((_c2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _c2.detectFace)) && !(options == null ? void 0 : options.retry)) {
@@ -10174,13 +10194,13 @@ var CameraRecorder = class {
10174
10194
  const settings = tracks[0].getSettings();
10175
10195
  let { width = 0, height = 0 } = settings;
10176
10196
  const isPortrait = (_d = screen.orientation) == null ? void 0 : _d.type.includes("portrait");
10177
- if (isPortrait && this.isMobileDevice()) {
10197
+ if (isPortrait && isMobileDevice()) {
10178
10198
  if (this.videoOptions.width == height && this.videoOptions.height == width) {
10179
10199
  [width, height] = [height, width];
10180
10200
  }
10181
10201
  }
10182
10202
  console.log("isPortrait -> ", isPortrait);
10183
- console.log("this.isMobileDevice() -> ", this.isMobileDevice());
10203
+ console.log("this.isMobileDevice() -> ", isMobileDevice());
10184
10204
  console.log("width -> ", width);
10185
10205
  console.log("height -> ", height);
10186
10206
  console.log("minWidth -> ", this.videoOptions.minWidth);
@@ -10446,11 +10466,17 @@ var DeviceCheckerUI = class {
10446
10466
  display: inline-block;
10447
10467
  width: 22px;
10448
10468
  height: 22px;
10469
+ min-width: 22px;
10470
+ max-width: 22px;
10471
+ min-height: 22px;
10472
+ max-height: 22px;
10473
+ flex-shrink: 0;
10449
10474
  -ms-transform: rotate(45deg); /* IE 9 */
10450
10475
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
10451
10476
  transform: rotate(45deg);
10452
10477
  border: 1px solid #16A34A;
10453
10478
  border-radius: 22px;
10479
+ box-sizing: border-box;
10454
10480
  }
10455
10481
 
10456
10482
  .checkmark_stem {
@@ -10475,11 +10501,17 @@ var DeviceCheckerUI = class {
10475
10501
  display: inline-block;
10476
10502
  width: 22px;
10477
10503
  height: 22px;
10504
+ min-width: 22px;
10505
+ max-width: 22px;
10506
+ min-height: 22px;
10507
+ max-height: 22px;
10508
+ flex-shrink: 0;
10478
10509
  -ms-transform: rotate(45deg); /* IE 9 */
10479
10510
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
10480
10511
  transform: rotate(45deg);
10481
10512
  border: 1px solid #FF0000;
10482
10513
  border-radius: 22px;
10514
+ box-sizing: border-box;
10483
10515
  }
10484
10516
 
10485
10517
  .checkmark_stem_error {
@@ -10540,6 +10572,13 @@ var DeviceCheckerUI = class {
10540
10572
  box-sizing: border-box;
10541
10573
  }
10542
10574
 
10575
+ /* Desktop screens - maintain gap between checks and camera */
10576
+ @media (min-width: 769px) {
10577
+ #checkDevices .modal-responsive .camera-container-responsive {
10578
+ gap: 20px !important;
10579
+ }
10580
+ }
10581
+
10543
10582
  @media (max-width: 768px) {
10544
10583
  #checkDevices .modal-responsive {
10545
10584
  width: 95% !important;
@@ -10566,29 +10605,28 @@ var DeviceCheckerUI = class {
10566
10605
  }
10567
10606
 
10568
10607
  #checkDevices .modal-responsive .camera-container-responsive {
10569
- flex-direction: column !important;
10570
- align-items: center !important;
10608
+ flex-direction: row !important;
10609
+ align-items: flex-start !important;
10610
+ gap: 15px !important;
10611
+ padding-left: 10px !important;
10612
+ padding-right: 10px !important;
10571
10613
  }
10572
10614
 
10573
10615
  #checkDevices .modal-responsive .video-responsive {
10574
- width: 100% !important;
10575
- max-width: 100% !important;
10616
+ width: auto !important;
10617
+ max-width: 320px !important;
10618
+ flex-shrink: 0 !important;
10576
10619
  max-height: 240px !important;
10577
10620
  }
10578
10621
 
10579
10622
  #checkDevices .modal-responsive .video-responsive video {
10580
10623
  width: 100% !important;
10581
- max-width: 100% !important;
10624
+ max-width: 320px !important;
10582
10625
  max-height: 200px !important;
10583
10626
  height: auto !important;
10584
10627
  object-fit: contain !important;
10585
10628
  }
10586
10629
 
10587
- #checkDevices .modal-responsive .camera-container-responsive {
10588
- padding-left: 10px !important;
10589
- padding-right: 10px !important;
10590
- }
10591
-
10592
10630
  #checkDevices .modal-responsive .mic-container-responsive {
10593
10631
  flex-direction: column !important;
10594
10632
  padding: 0px 20px !important;
@@ -10626,17 +10664,48 @@ var DeviceCheckerUI = class {
10626
10664
  margin: 5px !important;
10627
10665
  }
10628
10666
 
10667
+ #checkDevices .modal-responsive .camera-header-responsive,
10668
+ #checkDevices .modal-responsive .mic-header-responsive {
10669
+ gap: 0px !important;
10670
+ }
10671
+
10672
+ #checkDevices .modal-responsive .camera-header-responsive h3,
10673
+ #checkDevices .modal-responsive .mic-header-responsive h3 {
10674
+ margin: 0 !important;
10675
+ margin-top: 0 !important;
10676
+ margin-bottom: 0 !important;
10677
+ margin-left: 0 !important;
10678
+ margin-right: 0 !important;
10679
+ padding: 0 !important;
10680
+ padding-top: 0 !important;
10681
+ padding-bottom: 0 !important;
10682
+ }
10683
+
10684
+ #checkDevices .modal-responsive .camera-header-responsive select,
10685
+ #checkDevices .modal-responsive .mic-header-responsive select {
10686
+ margin: 0 !important;
10687
+ margin-top: 0 !important;
10688
+ margin-bottom: 0 !important;
10689
+ margin-left: 0 !important;
10690
+ margin-right: 0 !important;
10691
+ padding-top: 0 !important;
10692
+ }
10693
+
10629
10694
  #checkDevices .modal-responsive .camera-container-responsive {
10695
+ flex-direction: row !important;
10696
+ gap: 10px !important;
10630
10697
  padding-left: 5px !important;
10631
10698
  padding-right: 5px !important;
10632
10699
  }
10633
10700
 
10634
10701
  #checkDevices .modal-responsive .video-responsive {
10635
- max-height: 180px !important;
10702
+ max-width: 200px !important;
10703
+ max-height: 150px !important;
10636
10704
  }
10637
10705
 
10638
10706
  #checkDevices .modal-responsive .video-responsive video {
10639
- max-height: 180px !important;
10707
+ max-width: 200px !important;
10708
+ max-height: 150px !important;
10640
10709
  }
10641
10710
 
10642
10711
  #checkDevices .modal-responsive .pronounce-responsive {
@@ -10755,6 +10824,7 @@ var DeviceCheckerUI = class {
10755
10824
  width: "100%",
10756
10825
  display: "flex",
10757
10826
  justifyContent: "space-between",
10827
+ gap: "20px",
10758
10828
  borderBottom: "2px solid rgba(0, 0, 0, .1)",
10759
10829
  paddingBottom: "15px",
10760
10830
  paddingLeft: "20px",
@@ -10868,12 +10938,17 @@ var DeviceCheckerUI = class {
10868
10938
  alertDivSpyCam.appendChild(checkmark_SpyCam);
10869
10939
  alertDivSpyCam.appendChild(SpyCamAlert);
10870
10940
  center.style.transform = "rotateY(180deg)";
10941
+ center.style.display = "flex";
10942
+ center.style.flexDirection = "column";
10943
+ center.style.flex = "1";
10944
+ center.style.minWidth = "0";
10871
10945
  center.appendChild(alertDivResolution);
10872
10946
  center.appendChild(alertDivFacePosition);
10873
10947
  center.appendChild(alertDivAmbientVerify);
10874
10948
  center.appendChild(alertDivSpyCam);
10875
10949
  divCamera.appendChild(center);
10876
10950
  videoDiv.appendChild(video);
10951
+ videoDiv.style.flexShrink = "0";
10877
10952
  divCamera.appendChild(videoDiv);
10878
10953
  const mask = document.createElement("div");
10879
10954
  mask.setAttribute("class", "facial-biometry__mask");
@@ -10984,10 +11059,10 @@ var DeviceCheckerUI = class {
10984
11059
  alertDivMicrophone.setAttribute("class", "alert-div");
10985
11060
  alertDivMicrophone.setAttribute("id", "alertDivMicrophone");
10986
11061
  const alertDivMicrophoneStyles = {
10987
- // display: "flex",
10988
- alignItems: "start",
10989
- justifyContent: "end",
10990
- width: "inherit"
11062
+ display: "flex",
11063
+ alignItems: "center",
11064
+ justifyContent: "center",
11065
+ width: "100%"
10991
11066
  };
10992
11067
  this.applyStyles(alertDivMicrophone, alertDivMicrophoneStyles);
10993
11068
  const microphoneAlert = document.createElement("error");
@@ -11535,21 +11610,12 @@ var _DeviceCheckerService = class _DeviceCheckerService {
11535
11610
  return Promise.reject(error);
11536
11611
  }
11537
11612
  }
11538
- isMobileDevice() {
11539
- if ("userAgentData" in navigator) {
11540
- const navUAData = navigator.userAgentData;
11541
- const mobile = navUAData.mobile || false;
11542
- const platform = navUAData.platform || "";
11543
- return mobile || /Android|iOS/i.test(platform);
11544
- }
11545
- return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
11546
- }
11547
11613
  isUnderResolution() {
11548
11614
  var _a2;
11549
11615
  const settings = this.cameraRecorder.cameraStream.getVideoTracks()[0].getSettings();
11550
11616
  let { width = 0, height = 0 } = settings;
11551
11617
  const isPortrait = (_a2 = screen.orientation) == null ? void 0 : _a2.type.includes("portrait");
11552
- if (isPortrait && this.isMobileDevice()) {
11618
+ if (isPortrait && isMobileDevice()) {
11553
11619
  if (this.videoOptions.width == height && this.videoOptions.height == width) {
11554
11620
  [width, height] = [height, width];
11555
11621
  }
@@ -15087,26 +15153,6 @@ var IndexDbSessionRepository = class {
15087
15153
  }
15088
15154
  };
15089
15155
 
15090
- // src/utils/browserInformations.ts
15091
- function fnBrowserDetect() {
15092
- const userAgent = navigator.userAgent;
15093
- let browserName;
15094
- if (userAgent.match(/chrome|chromium|crios/i)) {
15095
- browserName = "chrome";
15096
- } else if (userAgent.match(/firefox|fxios/i)) {
15097
- browserName = "firefox";
15098
- } else if (userAgent.match(/safari/i)) {
15099
- browserName = "safari";
15100
- } else if (userAgent.match(/opr\//i)) {
15101
- browserName = "opera";
15102
- } else if (userAgent.match(/edg/i)) {
15103
- browserName = "edge";
15104
- } else {
15105
- browserName = "No browser detection";
15106
- }
15107
- return browserName;
15108
- }
15109
-
15110
15156
  // src/utils/geolocation.ts
15111
15157
  function getGeolocation() {
15112
15158
  return new Promise((resolve, reject) => {
@@ -19202,7 +19248,7 @@ Error: ` + error
19202
19248
  }
19203
19249
  async verifyBrowser() {
19204
19250
  const browserName = await fnBrowserDetect();
19205
- if (browserName !== "chrome" && browserName !== "firefox") {
19251
+ if (browserName !== "chrome" && browserName !== "firefox" && !isMobileDevice()) {
19206
19252
  trackers.registerBrowserNotSupported(
19207
19253
  this.proctoringId,
19208
19254
  `Browser n\xE3o suportado:
@@ -0,0 +1,11 @@
1
+ import { ProctoringFinisherOptions } from "../proctoring/proctoring";
2
+ export declare class Extension {
3
+ hasExtension: boolean;
4
+ tryes: number;
5
+ responseStart: boolean;
6
+ options: ProctoringFinisherOptions;
7
+ start(): Promise<boolean>;
8
+ sendVerifyMsg(link: string, token: string): void;
9
+ private verify;
10
+ addEventListener(): void;
11
+ }
package/index.js CHANGED
@@ -27664,6 +27664,35 @@ var getDefaultProctoringVideoOptions = {
27664
27664
  minHeight: 480
27665
27665
  };
27666
27666
 
27667
+ // src/utils/browserInformations.ts
27668
+ function fnBrowserDetect() {
27669
+ const userAgent = navigator.userAgent;
27670
+ let browserName;
27671
+ if (userAgent.match(/chrome|chromium|crios/i)) {
27672
+ browserName = "chrome";
27673
+ } else if (userAgent.match(/firefox|fxios/i)) {
27674
+ browserName = "firefox";
27675
+ } else if (userAgent.match(/safari/i)) {
27676
+ browserName = "safari";
27677
+ } else if (userAgent.match(/opr\//i)) {
27678
+ browserName = "opera";
27679
+ } else if (userAgent.match(/edg/i)) {
27680
+ browserName = "edge";
27681
+ } else {
27682
+ browserName = "No browser detection";
27683
+ }
27684
+ return browserName;
27685
+ }
27686
+ function isMobileDevice() {
27687
+ if ("userAgentData" in navigator) {
27688
+ const navUAData = navigator.userAgentData;
27689
+ const mobile = navUAData.mobile || false;
27690
+ const platform = navUAData.platform || "";
27691
+ return mobile || /Android|iOS/i.test(platform);
27692
+ }
27693
+ return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
27694
+ }
27695
+
27667
27696
  // src/plugins/insights.ts
27668
27697
  var backendService;
27669
27698
  var init = (backend) => {
@@ -28213,15 +28242,6 @@ var CameraRecorder = class {
28213
28242
  this.options.onBufferSizeErrorCallback && this.options.onBufferSizeErrorCallback();
28214
28243
  }
28215
28244
  }
28216
- isMobileDevice() {
28217
- if ("userAgentData" in navigator) {
28218
- const navUAData = navigator.userAgentData;
28219
- const mobile = navUAData.mobile || false;
28220
- const platform = navUAData.platform || "";
28221
- return mobile || /Android|iOS/i.test(platform);
28222
- }
28223
- return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
28224
- }
28225
28245
  async startRecording(options) {
28226
28246
  var _a2, _b, _c2, _d, _e3, _f, _g, _h;
28227
28247
  if ((((_a2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _a2.detectPerson) || ((_b = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _b.detectCellPhone) || ((_c2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _c2.detectFace)) && !(options == null ? void 0 : options.retry)) {
@@ -28271,13 +28291,13 @@ var CameraRecorder = class {
28271
28291
  const settings = tracks[0].getSettings();
28272
28292
  let { width = 0, height = 0 } = settings;
28273
28293
  const isPortrait = (_d = screen.orientation) == null ? void 0 : _d.type.includes("portrait");
28274
- if (isPortrait && this.isMobileDevice()) {
28294
+ if (isPortrait && isMobileDevice()) {
28275
28295
  if (this.videoOptions.width == height && this.videoOptions.height == width) {
28276
28296
  [width, height] = [height, width];
28277
28297
  }
28278
28298
  }
28279
28299
  console.log("isPortrait -> ", isPortrait);
28280
- console.log("this.isMobileDevice() -> ", this.isMobileDevice());
28300
+ console.log("this.isMobileDevice() -> ", isMobileDevice());
28281
28301
  console.log("width -> ", width);
28282
28302
  console.log("height -> ", height);
28283
28303
  console.log("minWidth -> ", this.videoOptions.minWidth);
@@ -28543,11 +28563,17 @@ var DeviceCheckerUI = class {
28543
28563
  display: inline-block;
28544
28564
  width: 22px;
28545
28565
  height: 22px;
28566
+ min-width: 22px;
28567
+ max-width: 22px;
28568
+ min-height: 22px;
28569
+ max-height: 22px;
28570
+ flex-shrink: 0;
28546
28571
  -ms-transform: rotate(45deg); /* IE 9 */
28547
28572
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
28548
28573
  transform: rotate(45deg);
28549
28574
  border: 1px solid #16A34A;
28550
28575
  border-radius: 22px;
28576
+ box-sizing: border-box;
28551
28577
  }
28552
28578
 
28553
28579
  .checkmark_stem {
@@ -28572,11 +28598,17 @@ var DeviceCheckerUI = class {
28572
28598
  display: inline-block;
28573
28599
  width: 22px;
28574
28600
  height: 22px;
28601
+ min-width: 22px;
28602
+ max-width: 22px;
28603
+ min-height: 22px;
28604
+ max-height: 22px;
28605
+ flex-shrink: 0;
28575
28606
  -ms-transform: rotate(45deg); /* IE 9 */
28576
28607
  -webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
28577
28608
  transform: rotate(45deg);
28578
28609
  border: 1px solid #FF0000;
28579
28610
  border-radius: 22px;
28611
+ box-sizing: border-box;
28580
28612
  }
28581
28613
 
28582
28614
  .checkmark_stem_error {
@@ -28637,6 +28669,13 @@ var DeviceCheckerUI = class {
28637
28669
  box-sizing: border-box;
28638
28670
  }
28639
28671
 
28672
+ /* Desktop screens - maintain gap between checks and camera */
28673
+ @media (min-width: 769px) {
28674
+ #checkDevices .modal-responsive .camera-container-responsive {
28675
+ gap: 20px !important;
28676
+ }
28677
+ }
28678
+
28640
28679
  @media (max-width: 768px) {
28641
28680
  #checkDevices .modal-responsive {
28642
28681
  width: 95% !important;
@@ -28663,29 +28702,28 @@ var DeviceCheckerUI = class {
28663
28702
  }
28664
28703
 
28665
28704
  #checkDevices .modal-responsive .camera-container-responsive {
28666
- flex-direction: column !important;
28667
- align-items: center !important;
28705
+ flex-direction: row !important;
28706
+ align-items: flex-start !important;
28707
+ gap: 15px !important;
28708
+ padding-left: 10px !important;
28709
+ padding-right: 10px !important;
28668
28710
  }
28669
28711
 
28670
28712
  #checkDevices .modal-responsive .video-responsive {
28671
- width: 100% !important;
28672
- max-width: 100% !important;
28713
+ width: auto !important;
28714
+ max-width: 320px !important;
28715
+ flex-shrink: 0 !important;
28673
28716
  max-height: 240px !important;
28674
28717
  }
28675
28718
 
28676
28719
  #checkDevices .modal-responsive .video-responsive video {
28677
28720
  width: 100% !important;
28678
- max-width: 100% !important;
28721
+ max-width: 320px !important;
28679
28722
  max-height: 200px !important;
28680
28723
  height: auto !important;
28681
28724
  object-fit: contain !important;
28682
28725
  }
28683
28726
 
28684
- #checkDevices .modal-responsive .camera-container-responsive {
28685
- padding-left: 10px !important;
28686
- padding-right: 10px !important;
28687
- }
28688
-
28689
28727
  #checkDevices .modal-responsive .mic-container-responsive {
28690
28728
  flex-direction: column !important;
28691
28729
  padding: 0px 20px !important;
@@ -28723,17 +28761,48 @@ var DeviceCheckerUI = class {
28723
28761
  margin: 5px !important;
28724
28762
  }
28725
28763
 
28764
+ #checkDevices .modal-responsive .camera-header-responsive,
28765
+ #checkDevices .modal-responsive .mic-header-responsive {
28766
+ gap: 0px !important;
28767
+ }
28768
+
28769
+ #checkDevices .modal-responsive .camera-header-responsive h3,
28770
+ #checkDevices .modal-responsive .mic-header-responsive h3 {
28771
+ margin: 0 !important;
28772
+ margin-top: 0 !important;
28773
+ margin-bottom: 0 !important;
28774
+ margin-left: 0 !important;
28775
+ margin-right: 0 !important;
28776
+ padding: 0 !important;
28777
+ padding-top: 0 !important;
28778
+ padding-bottom: 0 !important;
28779
+ }
28780
+
28781
+ #checkDevices .modal-responsive .camera-header-responsive select,
28782
+ #checkDevices .modal-responsive .mic-header-responsive select {
28783
+ margin: 0 !important;
28784
+ margin-top: 0 !important;
28785
+ margin-bottom: 0 !important;
28786
+ margin-left: 0 !important;
28787
+ margin-right: 0 !important;
28788
+ padding-top: 0 !important;
28789
+ }
28790
+
28726
28791
  #checkDevices .modal-responsive .camera-container-responsive {
28792
+ flex-direction: row !important;
28793
+ gap: 10px !important;
28727
28794
  padding-left: 5px !important;
28728
28795
  padding-right: 5px !important;
28729
28796
  }
28730
28797
 
28731
28798
  #checkDevices .modal-responsive .video-responsive {
28732
- max-height: 180px !important;
28799
+ max-width: 200px !important;
28800
+ max-height: 150px !important;
28733
28801
  }
28734
28802
 
28735
28803
  #checkDevices .modal-responsive .video-responsive video {
28736
- max-height: 180px !important;
28804
+ max-width: 200px !important;
28805
+ max-height: 150px !important;
28737
28806
  }
28738
28807
 
28739
28808
  #checkDevices .modal-responsive .pronounce-responsive {
@@ -28852,6 +28921,7 @@ var DeviceCheckerUI = class {
28852
28921
  width: "100%",
28853
28922
  display: "flex",
28854
28923
  justifyContent: "space-between",
28924
+ gap: "20px",
28855
28925
  borderBottom: "2px solid rgba(0, 0, 0, .1)",
28856
28926
  paddingBottom: "15px",
28857
28927
  paddingLeft: "20px",
@@ -28965,12 +29035,17 @@ var DeviceCheckerUI = class {
28965
29035
  alertDivSpyCam.appendChild(checkmark_SpyCam);
28966
29036
  alertDivSpyCam.appendChild(SpyCamAlert);
28967
29037
  center.style.transform = "rotateY(180deg)";
29038
+ center.style.display = "flex";
29039
+ center.style.flexDirection = "column";
29040
+ center.style.flex = "1";
29041
+ center.style.minWidth = "0";
28968
29042
  center.appendChild(alertDivResolution);
28969
29043
  center.appendChild(alertDivFacePosition);
28970
29044
  center.appendChild(alertDivAmbientVerify);
28971
29045
  center.appendChild(alertDivSpyCam);
28972
29046
  divCamera.appendChild(center);
28973
29047
  videoDiv.appendChild(video);
29048
+ videoDiv.style.flexShrink = "0";
28974
29049
  divCamera.appendChild(videoDiv);
28975
29050
  const mask = document.createElement("div");
28976
29051
  mask.setAttribute("class", "facial-biometry__mask");
@@ -29081,10 +29156,10 @@ var DeviceCheckerUI = class {
29081
29156
  alertDivMicrophone.setAttribute("class", "alert-div");
29082
29157
  alertDivMicrophone.setAttribute("id", "alertDivMicrophone");
29083
29158
  const alertDivMicrophoneStyles = {
29084
- // display: "flex",
29085
- alignItems: "start",
29086
- justifyContent: "end",
29087
- width: "inherit"
29159
+ display: "flex",
29160
+ alignItems: "center",
29161
+ justifyContent: "center",
29162
+ width: "100%"
29088
29163
  };
29089
29164
  this.applyStyles(alertDivMicrophone, alertDivMicrophoneStyles);
29090
29165
  const microphoneAlert = document.createElement("error");
@@ -29632,21 +29707,12 @@ var _DeviceCheckerService = class _DeviceCheckerService {
29632
29707
  return Promise.reject(error);
29633
29708
  }
29634
29709
  }
29635
- isMobileDevice() {
29636
- if ("userAgentData" in navigator) {
29637
- const navUAData = navigator.userAgentData;
29638
- const mobile = navUAData.mobile || false;
29639
- const platform = navUAData.platform || "";
29640
- return mobile || /Android|iOS/i.test(platform);
29641
- }
29642
- return /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
29643
- }
29644
29710
  isUnderResolution() {
29645
29711
  var _a2;
29646
29712
  const settings = this.cameraRecorder.cameraStream.getVideoTracks()[0].getSettings();
29647
29713
  let { width = 0, height = 0 } = settings;
29648
29714
  const isPortrait = (_a2 = screen.orientation) == null ? void 0 : _a2.type.includes("portrait");
29649
- if (isPortrait && this.isMobileDevice()) {
29715
+ if (isPortrait && isMobileDevice()) {
29650
29716
  if (this.videoOptions.width == height && this.videoOptions.height == width) {
29651
29717
  [width, height] = [height, width];
29652
29718
  }
@@ -33184,26 +33250,6 @@ var IndexDbSessionRepository = class {
33184
33250
  }
33185
33251
  };
33186
33252
 
33187
- // src/utils/browserInformations.ts
33188
- function fnBrowserDetect() {
33189
- const userAgent = navigator.userAgent;
33190
- let browserName;
33191
- if (userAgent.match(/chrome|chromium|crios/i)) {
33192
- browserName = "chrome";
33193
- } else if (userAgent.match(/firefox|fxios/i)) {
33194
- browserName = "firefox";
33195
- } else if (userAgent.match(/safari/i)) {
33196
- browserName = "safari";
33197
- } else if (userAgent.match(/opr\//i)) {
33198
- browserName = "opera";
33199
- } else if (userAgent.match(/edg/i)) {
33200
- browserName = "edge";
33201
- } else {
33202
- browserName = "No browser detection";
33203
- }
33204
- return browserName;
33205
- }
33206
-
33207
33253
  // src/utils/geolocation.ts
33208
33254
  function getGeolocation() {
33209
33255
  return new Promise((resolve, reject) => {
@@ -34451,7 +34497,7 @@ Error: ` + error
34451
34497
  }
34452
34498
  async verifyBrowser() {
34453
34499
  const browserName = await fnBrowserDetect();
34454
- if (browserName !== "chrome" && browserName !== "firefox") {
34500
+ if (browserName !== "chrome" && browserName !== "firefox" && !isMobileDevice()) {
34455
34501
  trackers.registerBrowserNotSupported(
34456
34502
  this.proctoringId,
34457
34503
  `Browser n\xE3o suportado:
@@ -46,7 +46,6 @@ export declare class DeviceCheckerService {
46
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
47
  private onUpdateCallback;
48
48
  checkDevices(options?: ProctoringSessionOptions, _videoOptions?: ProctoringVideoOptions): Promise<checkDevicesReturn>;
49
- private isMobileDevice;
50
49
  private isUnderResolution;
51
50
  private realtimeAlerts;
52
51
  private videoDeviceInterface;
@@ -52,7 +52,6 @@ export declare class CameraRecorder implements IRecorder {
52
52
  configImageCapture(): void;
53
53
  currentRetries: number;
54
54
  bufferError(e: any): Promise<void>;
55
- isMobileDevice(): boolean;
56
55
  startRecording(options?: {
57
56
  retry?: boolean;
58
57
  }): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easyproctor-hml",
3
- "version": "2.5.8",
3
+ "version": "2.5.10",
4
4
  "description": "Modulo web de gravação do EasyProctor",
5
5
  "main": "./index.js",
6
6
  "module": "./esm/index.js",