|
@@ -21,7 +21,7 @@
|
|
|
<div :class="['question-nav']">
|
|
|
<QuestionNavView :paper-struct="paperStruct" />
|
|
|
</div>
|
|
|
- <div v-if="faceEnable" class="camera">
|
|
|
+ <div v-if="faceEnable && startVideoAfterDelay" class="camera">
|
|
|
<FaceRecognition
|
|
|
v-if="faceEnable"
|
|
|
width="400"
|
|
@@ -83,6 +83,7 @@ export default {
|
|
|
showFaceId: false,
|
|
|
faceEnable: false,
|
|
|
timeouted: false,
|
|
|
+ startVideoAfterDelay: false,
|
|
|
PRODUCTION: process.env.NODE_ENV === "production",
|
|
|
};
|
|
|
},
|
|
@@ -256,7 +257,7 @@ export default {
|
|
|
} else {
|
|
|
initSnapshotTrialTimes++;
|
|
|
}
|
|
|
- }, 15 * 1000);
|
|
|
+ }, 20 * 1000);
|
|
|
|
|
|
// let initSnapshotTrialTimes = 0;
|
|
|
// const initSnapshot = setTimeout(() => {
|
|
@@ -320,6 +321,11 @@ export default {
|
|
|
// 避免macos上下塘动。避免产生滚动条。
|
|
|
document.body.classList.toggle("hide-body-scroll", true);
|
|
|
|
|
|
+ // NotAllowedError: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD
|
|
|
+ this.startVideoAfterDelayTimeout = setTimeout(() => {
|
|
|
+ this.startVideoAfterDelay = true;
|
|
|
+ }, 10 * 1000);
|
|
|
+
|
|
|
window._hmt.push(["_trackEvent", "正在考试页面", "进入页面"]);
|
|
|
|
|
|
if (typeof nodeRequire != "undefined") {
|
|
@@ -364,6 +370,7 @@ export default {
|
|
|
clearInterval(this.snapInterval);
|
|
|
clearTimeout(this.faceIdMsgTimeout);
|
|
|
clearTimeout(this.faceIdDivTimeout);
|
|
|
+ clearTimeout(this.startVideoAfterDelayTimeout);
|
|
|
closeWsWithoutReconnect();
|
|
|
this.updateExamState({
|
|
|
exam: null,
|