easyproctor-hml 2.5.10 → 2.5.11
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 +8 -0
- package/esm/index.js +89 -24
- package/index.js +89 -24
- package/new-flow/backend/BackendService.d.ts +1 -0
- package/package.json +1 -1
- package/unpkg/easyproctor.min.js +25 -25
- package/unpkg/easyproctor.min.js.map +3 -3
package/README.md
CHANGED
|
@@ -263,6 +263,14 @@ const {
|
|
|
263
263
|
token: "...",
|
|
264
264
|
});
|
|
265
265
|
```
|
|
266
|
+
## Release Note V 2.4.0
|
|
267
|
+
- Compatibilidade com dispositivos móveis
|
|
268
|
+
|
|
269
|
+
## Release Note V 2.3.3
|
|
270
|
+
- Correção do reset no startSession
|
|
271
|
+
|
|
272
|
+
## Release Note V 2.3.2
|
|
273
|
+
- Melhorias no fluxo da câmera externa (reset e goToExternalCameraPositionStep)
|
|
266
274
|
|
|
267
275
|
## Release Note V 2.4.0
|
|
268
276
|
- Compatibilidade com dispositivos móveis implementada
|
package/esm/index.js
CHANGED
|
@@ -6369,7 +6369,8 @@ var BaseDetection = class {
|
|
|
6369
6369
|
description: this.alertTranslate(description),
|
|
6370
6370
|
type
|
|
6371
6371
|
});
|
|
6372
|
-
|
|
6372
|
+
if (this.options.onRealtimeAlertsCallback == null)
|
|
6373
|
+
this.error && (this.error.innerText = description);
|
|
6373
6374
|
}
|
|
6374
6375
|
handleOk(description, type) {
|
|
6375
6376
|
this.options.onRealtimeAlertsCallback && this.options.onRealtimeAlertsCallback({
|
|
@@ -6405,6 +6406,18 @@ var BaseDetection = class {
|
|
|
6405
6406
|
return "Face detectada";
|
|
6406
6407
|
case "ok_position_face_detected":
|
|
6407
6408
|
return "Face na posi\xE7\xE3o correta";
|
|
6409
|
+
case "wrong_face_size_detected":
|
|
6410
|
+
return "Face muito perto da c\xE2mera, afaste-se um pouco mais";
|
|
6411
|
+
case "wrong_face_position_edge_detected":
|
|
6412
|
+
return "Face muito pr\xF3xima da borda, mova-se para o centro da tela";
|
|
6413
|
+
case "wrong_face_position_move_right_detected":
|
|
6414
|
+
return "Face n\xE3o centralizada, mova-se para a direita";
|
|
6415
|
+
case "wrong_face_position_move_left_detected":
|
|
6416
|
+
return "Face n\xE3o centralizada, mova-se para a esquerda";
|
|
6417
|
+
case "wrong_face_position_move_top_detected":
|
|
6418
|
+
return "Face n\xE3o centralizada, mova-se para cima";
|
|
6419
|
+
case "wrong_face_position_move_bottom_detected":
|
|
6420
|
+
return "Face n\xE3o centralizada, mova-se para baixo";
|
|
6408
6421
|
default:
|
|
6409
6422
|
return description;
|
|
6410
6423
|
}
|
|
@@ -6499,31 +6512,68 @@ var FaceDetection = class extends BaseDetection {
|
|
|
6499
6512
|
}
|
|
6500
6513
|
}
|
|
6501
6514
|
verify(result) {
|
|
6502
|
-
var _a2
|
|
6515
|
+
var _a2;
|
|
6503
6516
|
if (((_a2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _a2.detectFace) && result.detections.length !== this.numFacesSent) {
|
|
6504
6517
|
this.numFacesSent = result.detections.length;
|
|
6505
6518
|
if (result.detections.length === 0) {
|
|
6506
6519
|
this.handleAlert("no_face_detected", "face_detection_on_stream");
|
|
6520
|
+
return;
|
|
6507
6521
|
} else if (result.detections.length > 1) {
|
|
6508
6522
|
this.handleAlert("multiple_faces_detected", "face_detection_on_stream");
|
|
6523
|
+
return;
|
|
6509
6524
|
} else {
|
|
6510
6525
|
this.handleOk("face_ok", "face_detection_on_stream");
|
|
6511
6526
|
}
|
|
6512
6527
|
}
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6528
|
+
if (result.detections.length === 0) return;
|
|
6529
|
+
let face = result.detections[0].boundingBox;
|
|
6530
|
+
let video = document.getElementById(this.classVideo);
|
|
6531
|
+
const imageWidth = video.videoWidth;
|
|
6532
|
+
const imageHeight = video.videoHeight;
|
|
6533
|
+
let failedFacePosition = false;
|
|
6534
|
+
if (imageWidth > imageHeight) {
|
|
6535
|
+
if (face.height / imageHeight > 0.7) {
|
|
6536
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_size_detected", "position_detection_on_stream");
|
|
6537
|
+
failedFacePosition = true;
|
|
6538
|
+
this.emmitedPositionAlert = true;
|
|
6539
|
+
} else if (face.width / imageWidth > 0.7) {
|
|
6540
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_size_detected", "position_detection_on_stream");
|
|
6541
|
+
this.emmitedPositionAlert = true;
|
|
6542
|
+
failedFacePosition = true;
|
|
6543
|
+
}
|
|
6544
|
+
}
|
|
6545
|
+
let start = [face.originX, face.originY];
|
|
6546
|
+
let end = [face.originX + face.width, face.originY + face.height];
|
|
6547
|
+
if (start[0] < 0.1 * face.width || start[1] < 0.2 * face.height || end[0] > imageWidth - 0.1 * face.width || end[1] > imageHeight - 5) {
|
|
6548
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_edge_detected", "position_detection_on_stream");
|
|
6516
6549
|
this.emmitedPositionAlert = true;
|
|
6517
|
-
|
|
6518
|
-
|
|
6550
|
+
failedFacePosition = true;
|
|
6551
|
+
}
|
|
6552
|
+
let leftGap = start[0];
|
|
6553
|
+
let rightGap = imageWidth - end[0];
|
|
6554
|
+
let topGap = start[1];
|
|
6555
|
+
let bottomGap = imageHeight - end[1];
|
|
6556
|
+
if (leftGap > 2 * rightGap) {
|
|
6557
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_right_detected", "position_detection_on_stream");
|
|
6519
6558
|
this.emmitedPositionAlert = true;
|
|
6520
|
-
|
|
6521
|
-
|
|
6559
|
+
failedFacePosition = true;
|
|
6560
|
+
}
|
|
6561
|
+
if (topGap > 4 * bottomGap) {
|
|
6562
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_top_detected", "position_detection_on_stream");
|
|
6522
6563
|
this.emmitedPositionAlert = true;
|
|
6523
|
-
|
|
6524
|
-
|
|
6564
|
+
failedFacePosition = true;
|
|
6565
|
+
}
|
|
6566
|
+
if (rightGap > 2 * leftGap) {
|
|
6567
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_left_detected", "position_detection_on_stream");
|
|
6525
6568
|
this.emmitedPositionAlert = true;
|
|
6526
|
-
|
|
6569
|
+
failedFacePosition = true;
|
|
6570
|
+
}
|
|
6571
|
+
if (bottomGap > 3 * topGap) {
|
|
6572
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_bottom_detected", "position_detection_on_stream");
|
|
6573
|
+
this.emmitedPositionAlert = true;
|
|
6574
|
+
failedFacePosition = true;
|
|
6575
|
+
}
|
|
6576
|
+
if (failedFacePosition == false) {
|
|
6527
6577
|
this.emmitedPositionAlert && this.handleOk("ok_position_face_detected", "position_detection_on_stream");
|
|
6528
6578
|
this.emmitedPositionAlert = false;
|
|
6529
6579
|
}
|
|
@@ -9086,6 +9136,14 @@ var BackendService = class {
|
|
|
9086
9136
|
jwt: this.token
|
|
9087
9137
|
});
|
|
9088
9138
|
}
|
|
9139
|
+
async goToExternalCameraPositionStep(externalSessionId) {
|
|
9140
|
+
return await this.makeRequest({
|
|
9141
|
+
path: `/ExternalCamera/go-to-position-step/${externalSessionId}`,
|
|
9142
|
+
method: "POST",
|
|
9143
|
+
body: {},
|
|
9144
|
+
jwt: this.token
|
|
9145
|
+
});
|
|
9146
|
+
}
|
|
9089
9147
|
async externalCameraFinish(externalSessionId) {
|
|
9090
9148
|
return await this.makeRequest({
|
|
9091
9149
|
path: `/ExternalCamera/finish/${externalSessionId}`,
|
|
@@ -10820,6 +10878,9 @@ var DeviceCheckerUI = class {
|
|
|
10820
10878
|
const center = document.createElement("div");
|
|
10821
10879
|
video.setAttribute("id", "cameraStream");
|
|
10822
10880
|
video.muted = true;
|
|
10881
|
+
video.setAttribute("playsinline", "true");
|
|
10882
|
+
video.setAttribute("webkit-playsinline", "true");
|
|
10883
|
+
video.autoplay = true;
|
|
10823
10884
|
const divCameraStyles = {
|
|
10824
10885
|
width: "100%",
|
|
10825
10886
|
display: "flex",
|
|
@@ -11248,7 +11309,7 @@ var DeviceCheckerUI = class {
|
|
|
11248
11309
|
checkmark_kick_AmbientVerify.setAttribute("class", "checkmark_kick");
|
|
11249
11310
|
}
|
|
11250
11311
|
} else {
|
|
11251
|
-
if (checkmark_FacePosition &&
|
|
11312
|
+
if (checkmark_FacePosition && response.type === "position_detection_on_stream") {
|
|
11252
11313
|
facePositionAlert && (facePositionAlert.style.color = "#FF0000");
|
|
11253
11314
|
checkmark_FacePosition.setAttribute("class", "checkmark_error");
|
|
11254
11315
|
checkmark_stem_FacePosition.setAttribute("class", "checkmark_stem_error");
|
|
@@ -11353,7 +11414,9 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
11353
11414
|
const cameraStream = document.querySelector("#cameraStream");
|
|
11354
11415
|
if (cameraStream) {
|
|
11355
11416
|
cameraStream.srcObject = stream;
|
|
11356
|
-
cameraStream.play()
|
|
11417
|
+
cameraStream.play().catch((e3) => {
|
|
11418
|
+
console.warn("Erro ao iniciar preview de v\xEDdeo:", e3);
|
|
11419
|
+
});
|
|
11357
11420
|
}
|
|
11358
11421
|
}
|
|
11359
11422
|
audioDeviceInterfaceUIAllowedAmbient(allowedAmbient) {
|
|
@@ -11812,7 +11875,9 @@ var CapturePhoto = class {
|
|
|
11812
11875
|
);
|
|
11813
11876
|
await this.cameraRecorder.startRecording();
|
|
11814
11877
|
cameraContainer.srcObject = this.cameraRecorder.cameraStream;
|
|
11815
|
-
cameraContainer.play()
|
|
11878
|
+
cameraContainer.play().catch((e3) => {
|
|
11879
|
+
console.warn("Autoplay bloqueado ou erro ao iniciar v\xEDdeo:", e3);
|
|
11880
|
+
});
|
|
11816
11881
|
}
|
|
11817
11882
|
shot() {
|
|
11818
11883
|
const cameraContainer = document.querySelector("#cameraStream");
|
|
@@ -11905,6 +11970,9 @@ var CapturePhoto = class {
|
|
|
11905
11970
|
const video = document.createElement("video");
|
|
11906
11971
|
video.setAttribute("id", "cameraStream");
|
|
11907
11972
|
video.muted = true;
|
|
11973
|
+
video.setAttribute("playsinline", "true");
|
|
11974
|
+
video.setAttribute("webkit-playsinline", "true");
|
|
11975
|
+
video.autoplay = true;
|
|
11908
11976
|
divCamera.style.position = "fixed";
|
|
11909
11977
|
divCamera.style.top = "0";
|
|
11910
11978
|
divCamera.style.left = "0";
|
|
@@ -18154,15 +18222,12 @@ var _ExternalCameraChecker = class _ExternalCameraChecker {
|
|
|
18154
18222
|
}
|
|
18155
18223
|
}
|
|
18156
18224
|
async goToPositionGuide() {
|
|
18157
|
-
|
|
18158
|
-
const
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
this.externalSessionId,
|
|
18164
|
-
actionMessage
|
|
18165
|
-
);
|
|
18225
|
+
try {
|
|
18226
|
+
const response = await this.backend.goToExternalCameraPositionStep("" + this.externalSessionId);
|
|
18227
|
+
console.log(response);
|
|
18228
|
+
} catch (error) {
|
|
18229
|
+
console.error("Erro ao enviar comando de Position:", error);
|
|
18230
|
+
throw new Error("N\xE3o foi poss\xEDvel enviar comando de Position Guide.");
|
|
18166
18231
|
}
|
|
18167
18232
|
}
|
|
18168
18233
|
async reset() {
|
package/index.js
CHANGED
|
@@ -23654,7 +23654,8 @@ var BaseDetection = class {
|
|
|
23654
23654
|
description: this.alertTranslate(description),
|
|
23655
23655
|
type
|
|
23656
23656
|
});
|
|
23657
|
-
|
|
23657
|
+
if (this.options.onRealtimeAlertsCallback == null)
|
|
23658
|
+
this.error && (this.error.innerText = description);
|
|
23658
23659
|
}
|
|
23659
23660
|
handleOk(description, type) {
|
|
23660
23661
|
this.options.onRealtimeAlertsCallback && this.options.onRealtimeAlertsCallback({
|
|
@@ -23690,6 +23691,18 @@ var BaseDetection = class {
|
|
|
23690
23691
|
return "Face detectada";
|
|
23691
23692
|
case "ok_position_face_detected":
|
|
23692
23693
|
return "Face na posi\xE7\xE3o correta";
|
|
23694
|
+
case "wrong_face_size_detected":
|
|
23695
|
+
return "Face muito perto da c\xE2mera, afaste-se um pouco mais";
|
|
23696
|
+
case "wrong_face_position_edge_detected":
|
|
23697
|
+
return "Face muito pr\xF3xima da borda, mova-se para o centro da tela";
|
|
23698
|
+
case "wrong_face_position_move_right_detected":
|
|
23699
|
+
return "Face n\xE3o centralizada, mova-se para a direita";
|
|
23700
|
+
case "wrong_face_position_move_left_detected":
|
|
23701
|
+
return "Face n\xE3o centralizada, mova-se para a esquerda";
|
|
23702
|
+
case "wrong_face_position_move_top_detected":
|
|
23703
|
+
return "Face n\xE3o centralizada, mova-se para cima";
|
|
23704
|
+
case "wrong_face_position_move_bottom_detected":
|
|
23705
|
+
return "Face n\xE3o centralizada, mova-se para baixo";
|
|
23693
23706
|
default:
|
|
23694
23707
|
return description;
|
|
23695
23708
|
}
|
|
@@ -23784,31 +23797,68 @@ var FaceDetection = class extends BaseDetection {
|
|
|
23784
23797
|
}
|
|
23785
23798
|
}
|
|
23786
23799
|
verify(result) {
|
|
23787
|
-
var _a2
|
|
23800
|
+
var _a2;
|
|
23788
23801
|
if (((_a2 = this.paramsConfig.videoBehaviourParameters) == null ? void 0 : _a2.detectFace) && result.detections.length !== this.numFacesSent) {
|
|
23789
23802
|
this.numFacesSent = result.detections.length;
|
|
23790
23803
|
if (result.detections.length === 0) {
|
|
23791
23804
|
this.handleAlert("no_face_detected", "face_detection_on_stream");
|
|
23805
|
+
return;
|
|
23792
23806
|
} else if (result.detections.length > 1) {
|
|
23793
23807
|
this.handleAlert("multiple_faces_detected", "face_detection_on_stream");
|
|
23808
|
+
return;
|
|
23794
23809
|
} else {
|
|
23795
23810
|
this.handleOk("face_ok", "face_detection_on_stream");
|
|
23796
23811
|
}
|
|
23797
23812
|
}
|
|
23798
|
-
|
|
23799
|
-
|
|
23800
|
-
|
|
23813
|
+
if (result.detections.length === 0) return;
|
|
23814
|
+
let face = result.detections[0].boundingBox;
|
|
23815
|
+
let video = document.getElementById(this.classVideo);
|
|
23816
|
+
const imageWidth = video.videoWidth;
|
|
23817
|
+
const imageHeight = video.videoHeight;
|
|
23818
|
+
let failedFacePosition = false;
|
|
23819
|
+
if (imageWidth > imageHeight) {
|
|
23820
|
+
if (face.height / imageHeight > 0.7) {
|
|
23821
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_size_detected", "position_detection_on_stream");
|
|
23822
|
+
failedFacePosition = true;
|
|
23823
|
+
this.emmitedPositionAlert = true;
|
|
23824
|
+
} else if (face.width / imageWidth > 0.7) {
|
|
23825
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_size_detected", "position_detection_on_stream");
|
|
23826
|
+
this.emmitedPositionAlert = true;
|
|
23827
|
+
failedFacePosition = true;
|
|
23828
|
+
}
|
|
23829
|
+
}
|
|
23830
|
+
let start = [face.originX, face.originY];
|
|
23831
|
+
let end = [face.originX + face.width, face.originY + face.height];
|
|
23832
|
+
if (start[0] < 0.1 * face.width || start[1] < 0.2 * face.height || end[0] > imageWidth - 0.1 * face.width || end[1] > imageHeight - 5) {
|
|
23833
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_edge_detected", "position_detection_on_stream");
|
|
23801
23834
|
this.emmitedPositionAlert = true;
|
|
23802
|
-
|
|
23803
|
-
|
|
23835
|
+
failedFacePosition = true;
|
|
23836
|
+
}
|
|
23837
|
+
let leftGap = start[0];
|
|
23838
|
+
let rightGap = imageWidth - end[0];
|
|
23839
|
+
let topGap = start[1];
|
|
23840
|
+
let bottomGap = imageHeight - end[1];
|
|
23841
|
+
if (leftGap > 2 * rightGap) {
|
|
23842
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_right_detected", "position_detection_on_stream");
|
|
23804
23843
|
this.emmitedPositionAlert = true;
|
|
23805
|
-
|
|
23806
|
-
|
|
23844
|
+
failedFacePosition = true;
|
|
23845
|
+
}
|
|
23846
|
+
if (topGap > 4 * bottomGap) {
|
|
23847
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_top_detected", "position_detection_on_stream");
|
|
23807
23848
|
this.emmitedPositionAlert = true;
|
|
23808
|
-
|
|
23809
|
-
|
|
23849
|
+
failedFacePosition = true;
|
|
23850
|
+
}
|
|
23851
|
+
if (rightGap > 2 * leftGap) {
|
|
23852
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_left_detected", "position_detection_on_stream");
|
|
23810
23853
|
this.emmitedPositionAlert = true;
|
|
23811
|
-
|
|
23854
|
+
failedFacePosition = true;
|
|
23855
|
+
}
|
|
23856
|
+
if (bottomGap > 3 * topGap) {
|
|
23857
|
+
!this.emmitedPositionAlert && this.handleAlert("wrong_face_position_move_bottom_detected", "position_detection_on_stream");
|
|
23858
|
+
this.emmitedPositionAlert = true;
|
|
23859
|
+
failedFacePosition = true;
|
|
23860
|
+
}
|
|
23861
|
+
if (failedFacePosition == false) {
|
|
23812
23862
|
this.emmitedPositionAlert && this.handleOk("ok_position_face_detected", "position_detection_on_stream");
|
|
23813
23863
|
this.emmitedPositionAlert = false;
|
|
23814
23864
|
}
|
|
@@ -27183,6 +27233,14 @@ var BackendService = class {
|
|
|
27183
27233
|
jwt: this.token
|
|
27184
27234
|
});
|
|
27185
27235
|
}
|
|
27236
|
+
async goToExternalCameraPositionStep(externalSessionId) {
|
|
27237
|
+
return await this.makeRequest({
|
|
27238
|
+
path: `/ExternalCamera/go-to-position-step/${externalSessionId}`,
|
|
27239
|
+
method: "POST",
|
|
27240
|
+
body: {},
|
|
27241
|
+
jwt: this.token
|
|
27242
|
+
});
|
|
27243
|
+
}
|
|
27186
27244
|
async externalCameraFinish(externalSessionId) {
|
|
27187
27245
|
return await this.makeRequest({
|
|
27188
27246
|
path: `/ExternalCamera/finish/${externalSessionId}`,
|
|
@@ -28917,6 +28975,9 @@ var DeviceCheckerUI = class {
|
|
|
28917
28975
|
const center = document.createElement("div");
|
|
28918
28976
|
video.setAttribute("id", "cameraStream");
|
|
28919
28977
|
video.muted = true;
|
|
28978
|
+
video.setAttribute("playsinline", "true");
|
|
28979
|
+
video.setAttribute("webkit-playsinline", "true");
|
|
28980
|
+
video.autoplay = true;
|
|
28920
28981
|
const divCameraStyles = {
|
|
28921
28982
|
width: "100%",
|
|
28922
28983
|
display: "flex",
|
|
@@ -29345,7 +29406,7 @@ var DeviceCheckerUI = class {
|
|
|
29345
29406
|
checkmark_kick_AmbientVerify.setAttribute("class", "checkmark_kick");
|
|
29346
29407
|
}
|
|
29347
29408
|
} else {
|
|
29348
|
-
if (checkmark_FacePosition &&
|
|
29409
|
+
if (checkmark_FacePosition && response.type === "position_detection_on_stream") {
|
|
29349
29410
|
facePositionAlert && (facePositionAlert.style.color = "#FF0000");
|
|
29350
29411
|
checkmark_FacePosition.setAttribute("class", "checkmark_error");
|
|
29351
29412
|
checkmark_stem_FacePosition.setAttribute("class", "checkmark_stem_error");
|
|
@@ -29450,7 +29511,9 @@ Para iniciar um exame utilize uma outra c\xE2mera.`);
|
|
|
29450
29511
|
const cameraStream = document.querySelector("#cameraStream");
|
|
29451
29512
|
if (cameraStream) {
|
|
29452
29513
|
cameraStream.srcObject = stream4;
|
|
29453
|
-
cameraStream.play()
|
|
29514
|
+
cameraStream.play().catch((e3) => {
|
|
29515
|
+
console.warn("Erro ao iniciar preview de v\xEDdeo:", e3);
|
|
29516
|
+
});
|
|
29454
29517
|
}
|
|
29455
29518
|
}
|
|
29456
29519
|
audioDeviceInterfaceUIAllowedAmbient(allowedAmbient) {
|
|
@@ -29909,7 +29972,9 @@ var CapturePhoto = class {
|
|
|
29909
29972
|
);
|
|
29910
29973
|
await this.cameraRecorder.startRecording();
|
|
29911
29974
|
cameraContainer.srcObject = this.cameraRecorder.cameraStream;
|
|
29912
|
-
cameraContainer.play()
|
|
29975
|
+
cameraContainer.play().catch((e3) => {
|
|
29976
|
+
console.warn("Autoplay bloqueado ou erro ao iniciar v\xEDdeo:", e3);
|
|
29977
|
+
});
|
|
29913
29978
|
}
|
|
29914
29979
|
shot() {
|
|
29915
29980
|
const cameraContainer = document.querySelector("#cameraStream");
|
|
@@ -30002,6 +30067,9 @@ var CapturePhoto = class {
|
|
|
30002
30067
|
const video = document.createElement("video");
|
|
30003
30068
|
video.setAttribute("id", "cameraStream");
|
|
30004
30069
|
video.muted = true;
|
|
30070
|
+
video.setAttribute("playsinline", "true");
|
|
30071
|
+
video.setAttribute("webkit-playsinline", "true");
|
|
30072
|
+
video.autoplay = true;
|
|
30005
30073
|
divCamera.style.position = "fixed";
|
|
30006
30074
|
divCamera.style.top = "0";
|
|
30007
30075
|
divCamera.style.left = "0";
|
|
@@ -33403,15 +33471,12 @@ var _ExternalCameraChecker = class _ExternalCameraChecker {
|
|
|
33403
33471
|
}
|
|
33404
33472
|
}
|
|
33405
33473
|
async goToPositionGuide() {
|
|
33406
|
-
|
|
33407
|
-
const
|
|
33408
|
-
|
|
33409
|
-
|
|
33410
|
-
|
|
33411
|
-
|
|
33412
|
-
this.externalSessionId,
|
|
33413
|
-
actionMessage
|
|
33414
|
-
);
|
|
33474
|
+
try {
|
|
33475
|
+
const response = await this.backend.goToExternalCameraPositionStep("" + this.externalSessionId);
|
|
33476
|
+
console.log(response);
|
|
33477
|
+
} catch (error) {
|
|
33478
|
+
console.error("Erro ao enviar comando de Position:", error);
|
|
33479
|
+
throw new Error("N\xE3o foi poss\xEDvel enviar comando de Position Guide.");
|
|
33415
33480
|
}
|
|
33416
33481
|
}
|
|
33417
33482
|
async reset() {
|
|
@@ -18,6 +18,7 @@ export declare class BackendService {
|
|
|
18
18
|
externalCameraCheckTransmission(externalSessionId: string): Promise<any>;
|
|
19
19
|
externalCameraStartTransmission(externalSessionId: string, proctoringId: string): Promise<any>;
|
|
20
20
|
externalCameraStartSession(): Promise<any>;
|
|
21
|
+
goToExternalCameraPositionStep(externalSessionId: string): Promise<any>;
|
|
21
22
|
externalCameraFinish(externalSessionId: string): Promise<any>;
|
|
22
23
|
confirmStart(proctoringOptions: {
|
|
23
24
|
examId: any;
|