zhanghua
2022-12-13 a2d430479667247b782dc2dc47cc3695cf8a7c28
视频巡查优化
1个文件已修改
13 ■■■■■ 已修改文件
src/views/video/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/video/index.vue
@@ -49,7 +49,7 @@
              left: 50px;
            "
          >
            {{ item.name }}{{ item.community }}
            {{ item.community }}-{{ item.name }}
          </div>
          <video
            :id="item.id"
@@ -128,11 +128,11 @@
  mounted() {},
  methods: {
    loadVideo(item) {
      if (item.platResourceId) {
      if (Hls.isSupported()) {
        var video = document.getElementById(item.id);
        var hls = new Hls();
        videoPoint.getVideoPointUrl(item.platResourceId).then((res) => {
          if (res.code === 0) {
            hls.loadSource(res.data);
            hls.attachMedia(video);
@@ -151,6 +151,9 @@
            }, 2000);
          }
        });
        }
      } else {
        this.$message.error("暂无视频");
      }
    },
    getVideoPointList(data) {
@@ -218,6 +221,7 @@
      });
    },
    create(item) {
      if (item.code) {
      const DHWsInstance = DHWs.getInstance();
      this.ws = DHWsInstance;
      console.log(this.ws);
@@ -258,6 +262,9 @@
          console.warn(res);
        });
      }, 1000);
      } else {
        this.$message.error("暂无视频");
      }
    },
    destroy() {
@@ -432,6 +439,4 @@
video::-webkit-media-controls-toggle-closed-captions-button {
    display: none;
}
</style>