|
@@ -349,6 +349,7 @@ export default {
|
|
|
this.faceBiopsyInfo = faceBiopsyInfo;
|
|
|
},
|
|
|
async closeMe() {
|
|
|
+ this.closeCamera();
|
|
|
this.updateIsDoingFaceLiveness(false);
|
|
|
const faceLiveResultData = await this.$httpPostRetry(
|
|
|
"/api/ecs_oe_student/faceBiopsy/saveFaceBiopsyResult",
|
|
@@ -1056,7 +1057,7 @@ export default {
|
|
|
closeCamera: function() {
|
|
|
console.log("关闭摄像头");
|
|
|
const video = document.getElementById("inputVideo");
|
|
|
- if (video.srcObject) {
|
|
|
+ if (video && video.srcObject) {
|
|
|
video.srcObject.getTracks().forEach(function(track) {
|
|
|
track.stop();
|
|
|
});
|