ソースを参照

摄像头必须

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 ){