浏览代码

[SCREEN] video

sgw 1 年之前
父节点
当前提交
fa672c622a
共有 2 个文件被更改,包括 31 次插入31 次删除
  1. 30 30
      src/views/taskScreen.vue
  2. 1 1
      vue.config.js

+ 30 - 30
src/views/taskScreen.vue

@@ -807,34 +807,34 @@ export default {
       // 	})
       // }
       let params = {};
-       request("/dt_screen/video/videos/videoClose", "get", params, false);
+      request("/dt_screen/video/videos/videoClose", "get", params, false);
       
       // const res = request("/dt_screen/video/videos/videoClose", "get", params, false);
-      // this.initUrl(subjectName + "课目");
-      // setTimeout(() => {
-      //   let index = 0;
-
-      //   this.playerList.forEach((item) => {
-      //     item.src([{ type: "application/x-mpegURL", src: this.dataSrc[index++] }]);
-      //     item.load();
-      //     item.play();
-      //   });
-      // }, 35000);
+      this.initUrl(subjectName + "课目");
+      setTimeout(() => {
+        let index = 0;
+
+        this.playerList.forEach((item) => {
+          item.src([{ type: "application/x-mpegURL", src: this.dataSrc[index++] }]);
+          item.load();
+          item.play();
+        });
+      }, 5000);
     }
   },
   mounted() {
-    //  this.initUrl()
-    let url = "rtsp://admin:sgw123456@192.168.0.64:554/h265/ch01/main/av_stream";
-    url = url.split("/");
-    url = url[2];
-    url = url.split(":");
-    this.mainVideoData.Username = url[0];
-    this.mainVideoData.Port = url[2];
-    url = url[1];
-    url = url.split("@");
-    this.mainVideoData.IP = url[1];
-    this.mainVideoData.Password = url[0];
-    console.log("this.mainVideoData :>> ", this.mainVideoData);
+    this.initUrl()
+    // let url = "rtsp://admin:sgw123456@192.168.0.64:554/h265/ch01/main/av_stream";
+    // url = url.split("/");
+    // url = url[2];
+    // url = url.split(":");
+    // this.mainVideoData.Username = url[0];
+    // this.mainVideoData.Port = url[2];
+    // url = url[1];
+    // url = url.split("@");
+    // this.mainVideoData.IP = url[1];
+    // this.mainVideoData.Password = url[0];
+    // console.log("this.mainVideoData :>> ", this.mainVideoData);
 
     // 获取全部单位
     this.getAllUnits();
@@ -845,12 +845,12 @@ export default {
 
 
 
-    //     // 过14秒调用
-    // setTimeout(() => {
-    //   for (let index = 0; index < this.dataSrc.length; index++) {
-    //     this.initVideo(this.dataSrc[index], this.videoList[index]);
-    //   }
-    // }, 5500);
+        // 过14秒调用
+    setTimeout(() => {
+      for (let index = 0; index < this.dataSrc.length; index++) {
+        this.initVideo(this.dataSrc[index], this.videoList[index]);
+      }
+    }, 5500);
   },
   beforeDestroy() {
     if (this.playerList.length) {
@@ -858,7 +858,7 @@ export default {
         item.dispose();
       });
     }
-    
+    let params ={}
     const res = request("/dt_screen/video/videos/videoClose", "get", params, false);
   }
 };

+ 1 - 1
vue.config.js

@@ -3,7 +3,7 @@ module.exports = {
     publicPath: './',
     devServer: {
         host: "127.0.0.1",
-        port: 8080,
+        port: 8081,
         disableHostCheck: true,
         proxy: {
             '/dt_screen/': {