소스 검색

摄像头必须

y595705120 2 년 전
부모
커밋
41debdfc14
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      src/containers/center/play/components/iMedia.vue

+ 4 - 1
src/containers/center/play/components/iMedia.vue

@@ -151,6 +151,7 @@
             this.$message.error(
               "摄像头开启失败,请检查摄像头是否可用!或者打开摄影头"
             );
+            this.isnotbtn=false
             console.error("摄像头开启失败,请检查摄像头是否可用!");
           });
       },
@@ -282,8 +283,10 @@
           console.log("finish")
           return;
         }
-        if( !this.isnotbtn ){
+
+        if( !this.isnotbtn && this.onPlay ){
           this.$message.errorMsg("需要安装摄像头才能学习", 2);
+          this.doPause()
           return;
         }
         if( this.errCount > 3 ){