|
@@ -1654,7 +1654,9 @@ export default {
|
|
|
|
|
|
photographSuccess(stream) {
|
|
|
// 兼容webkit核心浏览器
|
|
|
-
|
|
|
+ if (this.isVirtualCamera(stream)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
this.isTaking = true;
|
|
|
this.takePhotoModal = true;
|
|
|
|
|
@@ -1685,7 +1687,30 @@ export default {
|
|
|
this.$router.go(-1);
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+ isVirtualCamera(stream) {
|
|
|
+ const list = ['VCam', 'ManyCam', 'OBS', 'ClassInCam', 'Ev', 'Video2Webcam']
|
|
|
+ let isT = list.some(e => {
|
|
|
+ return stream.getTracks()[0].label.indexOf(e) != -1
|
|
|
+ })
|
|
|
+ if (isT) {
|
|
|
+ this.$confirm(
|
|
|
+ "检测到你使用虚拟摄像头,无法继续学习。",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "返回",
|
|
|
+ showConfirmButton: true,
|
|
|
+ closeOnClickModal: false,
|
|
|
+ showCancelButton: false,
|
|
|
+ closeOnPressEscape: false,
|
|
|
+ distinguishCancelAndClose: false,
|
|
|
+ showClose: false,
|
|
|
+ }
|
|
|
+ ).then(() => {
|
|
|
+ this.$router.go(-1);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return isT
|
|
|
+ },
|
|
|
/**
|
|
|
* 记录总题数,获取recordId
|
|
|
* hasSpecial (是否包含简答和案例) true 包含 false 不包含
|